POST
/
checkout
/
session
cURL
curl --request POST \
  --url https://api.clinkbill.dev/api/checkout/session \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-Timestamp: <api-key>' \
  --data '{
  "customerId": "customer_id",
  "originalAmount": 4.99,
  "originalCurrency": "USD",
  "priceId": "price_id",
  "productId": "prd_id"
}'
{
  "code": 200,
  "msg": "success",
  "data": {
    "sessionId": "sess_abc123xyz",
    "tokenValue": "<string>",
    "customerId": "cus_12345",
    "originalAmount": 99.99,
    "originalCurrency": "USD",
    "url": "https://checkout.clinkbill.dev/pay/sess_abc123xyz",
    "merchantReferenceId": "order_ref_123",
    "expireTime": "2023-11-07T05:31:56Z"
  }
}

Authorizations

X-API-KEY
string
header
required

Your secret API key obtained from the Clink dashboard (Developers section)

X-Timestamp
string
header
required

Current timestamp in milliseconds since Unix epoch (required for request signing)

Body

application/json

Parameters required to initialize a new checkout session

Response

200 - application/json

Checkout session created successfully

Response object returned when creating a new checkout session