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:
| Field | Description |
|---|---|
gatewayName | Name of the payment gateway |
gatewayReference | Gateway’s transaction reference |
authorizationCode | Authorization code from issuer |
amount | Charged amount |
currency | Currency code |
operationResultCode | Success, Rejected, Error |
operationResultDescription | Human-readable result message |
gatewayResultDescription | Message from the gateway |
Direct Results (PayPal, BankPay, UPI)
Redirect-based payments return results throughdirectChargeResults:
Tokenization Results
When usingTOKENIZE or CHARGE_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: