Create S2S Setup Method
Create a new setup method for storing payment methods server to server
- Use this endpoint when you already gathered card details and consent within your PCI DSS compliant environment
- You must obtain explicit approval from hello@xpaycheckout.com before using this API
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Headers
A unique key for making the request idempotent. Must match pattern: ^[a-zA-Z0-9\-_:\.]+$. See Idempotent Requests for more details.
255^[a-zA-Z0-9\-_:\.]+$Body
Create S2S Setup Method
Three letter abbreviation of the currency. Refer supported currencies
"USD"
Billing details for the customer.
The URL we will callback to once the setup is complete
"https://example.com/callback"
Payment card information collected by you
The unique identifier for the customer, generated via the create-customer API.
⚠️ Please note: Provide either customerReferenceId or this field, not both, as they are mutually exclusive.
"cus_Tfd3Jq1tZxPjYVhRQW2r3"
Your unique identifier for the customer.
⚠️ Please note: Provide either customerId or this field, not both, as they are mutually exclusive.
"eTfd3Jq1tZxPjYVhRQW2r3"
The unique identifier for your storefront
"sf_sK8d3Jq1tZxPjYVhRQW2rf"
Flag to indicate whether phone number is required from the customer during checkout. By default, this is false.
false
The amount to charge immediately while setting up the payment method token. The amount in lowest count unit e.g.: For USD 1, amount is 100 representing 100 cents. Should be greater than 0.
100
Your identifier of the order. This will be persisted in the intent created while setting up the payment method token.
"order123"
A collection of key-value pairs that can be attached to an object for storing additional structured information.
Constraints:
- Maximum of 50 key-value pairs allowed.
- Each key must be no longer than 40 characters.
- Each value must be a string and cannot exceed 500 characters.
{
"orderId": "12345",
"customerNote": "Setup for recurring payments"
}Response
Setup Method created successfully