POST
/
link
/
merchant
/
generate-link
curl --request POST \
  --url https://api.xpaycheckout.com/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",
  "paymentMethods": [
    "CARD",
    "GOOGLE_PAY",
    "APPLE_PAY"
  ],
  "storeFrontId": "sf_sK8d3Jq1tZxPjYVhRQW2rf"
}'
{
  "shortUrl": "https://api.xpaycheckout.com/link/pcTrro7D",
  "disclaimer": "GBP is not supported on Klarna. The payment will default to USD."
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

Generate Payment Link

The body is of type object.

Response

200
application/json

Generate Payment Link

The response is of type object.