Integration
- Get Your Keys
- One Time Payment
- Subscription
- Setup Method
- Decline Codes
- Mobile App Integration
Working with our APIs
- API Introduction
- Authentication
- Payment Statuses
- Subscription Statuses
- Errors
- API Endpoints
- Payments
- Subscriptions
- Payment Links
- Customer
- Setup Method
Webhooks
- Webhooks Introduction
- Webhook Verification
- Webhooks events
Help
Subscriptions
Subscription Link
POST
/
subscription
/
link
/
merchant
/
generate-link
Copy
curl --request POST \
--url https://api.xpaycheckout.com/subscription/link/merchant/generate-link \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"amount": 100,
"currency": "USD",
"receiptId": "order123",
"customerDetails": {
"name": "John Doe",
"email": "john.doe@example.com",
"contactNumber": 9123456789,
"customerAddress": {
"country": "US",
"postalCode": "2424"
}
},
"description": "Order for 2 items",
"expiryDate": 32526868154000,
"callbackUrl": "https://example.com/callback",
"cancelUrl": "https://example.com/cancel",
"interval": "MONTH",
"intervalCount": 2,
"cycleCount": 2,
"upfrontAmount": 200
}'
Copy
{
"shortUrl": "https://api.xpaycheckout.com/subscription/link/pcTrro7D",
"disclaimer": "GBP is not supported on Klarna. The payment will default to USD."
}
Authorizations
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Body
application/json
Generate Subscription Link
The body is of type object
.
Response
200
application/json
Generate Subscription Link
The response is of type object
.
Was this page helpful?
Copy
curl --request POST \
--url https://api.xpaycheckout.com/subscription/link/merchant/generate-link \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '{
"amount": 100,
"currency": "USD",
"receiptId": "order123",
"customerDetails": {
"name": "John Doe",
"email": "john.doe@example.com",
"contactNumber": 9123456789,
"customerAddress": {
"country": "US",
"postalCode": "2424"
}
},
"description": "Order for 2 items",
"expiryDate": 32526868154000,
"callbackUrl": "https://example.com/callback",
"cancelUrl": "https://example.com/cancel",
"interval": "MONTH",
"intervalCount": 2,
"cycleCount": 2,
"upfrontAmount": 200
}'
Copy
{
"shortUrl": "https://api.xpaycheckout.com/subscription/link/pcTrro7D",
"disclaimer": "GBP is not supported on Klarna. The payment will default to USD."
}
Assistant
Responses are generated using AI and may contain mistakes.