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,
"trialPeriodCount": 7,
"trialPeriodInterval": "DAY",
"multiUseLimit": 5,
"productPage": {
"name": "Premium Subscription",
"description": "Access to premium features and content"
}
}'
{
"shortUrl": "https://api.xpaycheckout.com/subscription/link/pcTrro7D",
"disclaimer": "GBP is not supported on Klarna. The payment will default to USD."
}
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,
"trialPeriodCount": 7,
"trialPeriodInterval": "DAY",
"multiUseLimit": 5,
"productPage": {
"name": "Premium Subscription",
"description": "Access to premium features and content"
}
}'
{
"shortUrl": "https://api.xpaycheckout.com/subscription/link/pcTrro7D",
"disclaimer": "GBP is not supported on Klarna. The payment will default to USD."
}
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Generate Subscription Link
The body is of type object
.
Generate Subscription Link
The response is of type object
.
Was this page helpful?