Skip to main content
POST

Payments Library Reference

Complete reference for Payments Library operations
After a charge or tokenization operation completes, the client-side Payments Library returns a payment token to your callback function. Call this endpoint from your server to verify the token is authentic and has not been tampered with.

Error Responses

Parameters

Headers

string
required
Your API key prefixed with APIKEY. Example: APIKEY your-api-key. See the Authentication guide.

Request Body

string
required
The payment token string received in the client-side callback function. Pass it as the raw request body.

Response

A successful validation returns the decoded operation results. Which fields are populated depends on the operation and payment method:
  • upgChargeResults - PSP transaction details for card, Apple Pay, and Google Pay charges. Always a single object holding the final gateway attempt.
  • failedUpgChargeResults - Array of earlier failed attempts when a payment gateway fallback chain ran. null when the first attempt was the only one.
  • directChargeResults - Results for redirect-based methods (PayPal, bank payments, UPI).
  • tokenAndMaskedCardModel - Token and masked card details for TOKENIZE, CHARGE_AND_TOKENIZE, and PREAUTH_AND_TOKENIZE operations.
An invalid or tampered token returns error -125 with HTTP 400.