This page is part of the Payments Library Guides. Prefer direct API calls instead? See REST API Guides.
Parsing Results
UseparseResultToken() to decode the result token:
data- The parsed result objectsuccess- Boolean indicating if the token was decoded (not whether payment succeeded)
Checking Payment Success
Always checkclientSuccess first:
Result Types
Results vary based on the payment method used:PSP Results (CardPay, Apple Pay, Google Pay)
Card-based payments return results throughupgChargeResults:
upgChargeResults is always a single object holding the final gateway attempt. If your account has a gateway fallback chain and earlier attempts failed, those failed attempts are returned separately as an array in failedUpgChargeResults. When there was only one attempt, failedUpgChargeResults is null.Direct Results (PayPal, BankPay, UPI)
Redirect-based payments return results throughdirectChargeResults:
Tokenization Results
When usingTOKENIZE, CHARGE_AND_TOKENIZE, or PREAUTH_AND_TOKENIZE, card details are returned in tokenAndMaskedCardModel:
Complete Example
Server-Side Validation
Always validate results on your server before fulfilling orders:Getting Selected Payment Method
UsegetSelectedProviderName() to know which payment method the customer used:
Related
Library Reference
Full API reference
Complete Example
End-to-end integration
Start Session API
Create a session token
Validate Results API
Server-side validation endpoint