Skip to main content
POST
/
checkout
/
session
Create Checkout Session
curl --request POST \
  --url https://uat-api.clinkbill.com/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": 123,
  "msg": "<string>",
  "data": {
    "sessionId": "sess_abc123xyz",
    "tokenValue": "<string>",
    "customerId": "cus_12345",
    "originalAmount": 99.99,
    "originalCurrency": "USD",
    "url": "https://uat-checkout.clinkbill.com/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

originalAmount
number
required

Total transaction amount in the specified currency (must be greater than 0)

Required range: x > 0
originalCurrency
string
required

Three-letter ISO currency code for the transaction (e.g., USD, EUR, GBP)

customerId
string

Existing customer's unique identifier (required if customerEmail is not provided)

customerEmail
string

Customer's email address. A new customer account will be created if the email is not associated with an existing customer

merchantReferenceId
string

Your internal reference ID for tracking (non-unique identifier, does not guarantee idempotency)

priceId
string

Unique identifier of the predefined price configuration from your dashboard

productId
string

Unique identifier of the product configured in your dashboard

successUrl
string

URL where customers will be redirected after successful payment completion

cancelUrl
string

URL where customers will be redirected if they cancel the checkout process

paymentMethodType
enum<string>

The default selected payment method for created checkout session. Recommended if you know customer preference in advance

Available options:
CARD,
KAKAO,
CASHAPP,
WECHAT
paymentMethodTypeBlackList
enum<string>[]

List of payment method types to be excluded from the checkout session. Recommended if you know customer preference in advance. Supported values: KAKAO, CASHAPP, WECHAT

Available options:
KAKAO,
CASHAPP,
WECHAT
priceDataList
object[]

List of product pricing details for one-time purchases. Use this when creating transactions without pre-configured products

allowPromotionCodes
boolean

Set to true to enable customers to enter promotion codes during checkout

promotionCode
string

Pre-filled promotion code for the checkout session. Only effective when allowPromotionCodes is set to true

Response

Checkout session created successfully

code
integer<int32>
msg
string
data
object

Details of the created checkout session