Skip to main content
POST
/
payments
/
charge-tokenised-pm
cURL
curl --request POST \
  --url https://api.xpaycheckout.com/payments/charge-tokenised-pm \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "pmId": "pmt_ftoeKIYGC3f43frT",
  "customerId": "cus_Tfd3Jq1tZxPjYVhRQW2r3",
  "currency": "USD",
  "amount": 1000,
  "storeFrontId": "sf_sadfsdfsdf213dsaf"
}'
{
  "intentId": "in_dHd3Jq1tZxPjYVhRQW2r3",
  "status": "SUCCESS",
  "errorCode": "card_declined"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

Charge Tokenized Payment Method

pmId
string
required

Unique identifier of the payment method to charge

Example:

"pmt_ftoeKIYGC3f43frT"

customerId
string
required

Your unique identifier for the customer

Example:

"cus_Tfd3Jq1tZxPjYVhRQW2r3"

currency
string
required

Three letter abbreviation of the currency

Example:

"USD"

amount
integer
required

The amount in lowest count unit (e.g., cents for USD)

Example:

1000

storeFrontId
string

Unique identifier of the storefront

Example:

"sf_sadfsdfsdf213dsaf"

Response

Payment charged successfully

intentId
string

Unique identifier of the payment intent

Example:

"in_dHd3Jq1tZxPjYVhRQW2r3"

status
string

The status of the payment intent. Refer payment intent status

Example:

"SUCCESS"

errorCode
string

Error code if the operation was not successful

Example:

"card_declined"

I