v1
latestOpenAPI 3.0.1MIT2026-07-26336777.7 KBCreate a new setup method for storing payment methods server to server
post/setup-method/s2s/create
Headers
Idempotency-Keystring
A unique key for making the request idempotent. Must match pattern: ^[a-zA-Z0-9\-_:\.]+$. See Idempotent Requests for more details.
Request body
Example request
{
"currency": "USD",
"customerId": "cus_Tfd3Jq1tZxPjYVhRQW2r3",
"customerReferenceId": "eTfd3Jq1tZxPjYVhRQW2r3",
"billingDetails": {
"name": "John Doe",
"email": "john.doe@example.com",
"contactNumber": "+919123456789",
"customerAddress": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 1",
"city": "New York",
"state": "NY",
"country": "US",
"postalCode": "2424"
}
},
"storeFrontId": "sf_sK8d3Jq1tZxPjYVhRQW2rf",
"callbackUrl": "https://example.com/callback",
"cardDetails": {
"cardHolderName": "John Doe",
"cardNumber": "4000002500000003",
"expiryMonth": 1,
"expiryYear": 28,
"cvv": "123",
"country": "US",
"postalCode": "2424"
},
"amount": 100,
"receiptId": "order123",
"metadata": {
"orderId": "12345",
"customerNote": "Setup for recurring payments"
}
}Response
Setup Method created successfully
Example response
{
"setupMethodId": "sm_sK8d3Jq1tZxPjYVhRQW2rf",
"fwdUrl": "https://pay.xpaycheckout.com/setup-method?id=sm_sK8d3Jq1tZxPjYVhRQW2rf&secret=4b5PyxKSOuunnnFruohoiF"
}