v1
latestOpenAPI 3.0.1MIT2026-07-26336777.7 KBThis API can be used to generate subscription links programmatically. Subscription links are basically standalone webpages where your customer can make a subscription payment.
post/subscription/link/merchant/generate-link
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
{
"amount": 100,
"currency": "USD",
"receiptId": "order123",
"customerDetails": {
"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"
}
},
"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,
"trialPeriodCount": 7,
"trialPeriodInterval": "DAY",
"multiUseLimit": 5,
"productPage": {
"name": "Premium Subscription",
"description": "Access to premium features and content"
}
}Response
Generate Subscription Link
Example response
{
"shortUrl": "https://api.xpaycheckout.com/subscription/link/pcTrro7D",
"disclaimer": "GBP is not supported on Klarna. The payment will default to USD."
}