POST
/
setup-method
/
create
curl --request POST \
  --url https://api.xpaycheckout.com/setup-method/create \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "currency": "USD",
  "paymentMethods": [
    "CARD",
    "GOOGLE_PAY",
    "APPLE_PAY"
  ],
  "customerId": "cus_Tfd3Jq1tZxPjYVhRQW2r3",
  "storeFrontId": "sf_sK8d3Jq1tZxPjYVhRQW2rf",
  "callbackUrl": "https://example.com/callback",
  "metadata": {
    "orderId": "12345",
    "customerNote": "Setup for recurring payments"
  }
}'
{
  "setupMethodId": "sm_sK8d3Jq1tZxPjYVhRQW2rf",
  "fwdUrl": "https://pay.xpaycheckout.com/setup-method?id=sm_sK8d3Jq1tZxPjYVhRQW2rf&secret=4b5PyxKSOuunnnFruohoiF"
}

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

Create Setup Method

The body is of type object.

Response

200
application/json

Setup Method created successfully

The response is of type object.