Skip to main content
POST
/
payment
curl --request POST \
  --url https://uat-api.clinkbill.com/api/payment \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-Timestamp: <api-key>' \
  --data '
{
  "customerId": "cus_xxxxx",
  "productId": "prd_xxxxx",
  "priceId": "price_xxxxx",
  "paymentInstrumentId": "pi_xxxxx",
  "paymentMethodType": "CARD",
  "returnUrl": "https://merchant.example.com/payment/return",
  "merchantReferenceId": "pay_ref_123",
  "platformType": "WEB",
  "deviceType": "Android"
}
'
{
  "code": 200,
  "msg": "success",
  "data": {
    "orderId": "<string>",
    "sessionId": "<string>",
    "action": {
      "redirectUrl": "<string>",
      "walletHandleRedirectOrDisplayQrCode": {
        "imageUrlPng": "<string>",
        "imageUrlSvg": "<string>",
        "imageDataUrl": "<string>",
        "hostedInstructionsUrl": "<string>",
        "mobileAuthUrl": "<string>",
        "fallbackUrl": "<string>",
        "packageName": "<string>",
        "expiresAt": 123,
        "expiresSecond": 123
      },
      "paymentMethodType": "<string>",
      "postData": {}
    },
    "amount": 123,
    "currency": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.clinkbill.com/llms.txt

Use this file to discover all available pages before exploring further.

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 create a one-time payment by API. Provide at least one customer identifier. Provide either priceId with productId, or amount with currency.

paymentInstrumentId
string
required

Existing payment instrument ID.

paymentMethodType
enum<string>
required

Payment method type. Supported values are uppercase.

Available options:
ALIPAY,
CARD,
CASHAPP,
GCASH,
KAKAO,
PROMPTPAY,
QRIS,
TNG,
WECHAT
returnUrl
string
required

URL where the customer is redirected after required payment actions.

customerId
string

Existing customer ID. At least one customer identifier is required.

customerEmail
string

Customer email. Used to resolve or create a customer when customerId is not provided.

referenceCustomerId
string

Merchant-side customer ID used to resolve, create, or bind a customer.

priceId
string

Predefined one-time price ID. If provided, productId is required.

productId
string

Product ID. Required when priceId is provided.

priceDataList
object[]

Product and price line items for direct amount payments or display/risk data.

amount
number

Direct payment amount. Required with currency when priceId is not provided.

currency
string

Direct payment currency. Required with amount when priceId is not provided.

merchantReferenceId
string

Merchant-side reference ID for reconciliation.

promotionCode
string

Promotion code to apply.

metadata
object

Merchant metadata. Values must be strings.

platformType
enum<string>

Platform type. Supported values are WEB and WAP.

Available options:
WEB,
WAP
deviceType
enum<string>

Device type. Supported values are Android and iOS.

Available options:
Android,
iOS

Response

Payment created successfully

code
integer<int32>

Response status code, 200 when success

Example:

200

msg
string

Brief description of what happened, 'success' when happy case

Example:

"success"

data
object

Response data returned after creating a one-time payment. It contains the order and session identifiers, together with the payment flow result.