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: <x-timestamp>' \
--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",
"billingAddress": {
"city": "San Francisco",
"region": "CA",
"country": "US",
"line1": "123 Market Street",
"line2": "Suite 100",
"postalCode": "94105"
},
"platformType": "WEB",
"deviceType": "Android"
}
'{
"code": 200,
"msg": "success",
"data": {
"orderId": "<string>",
"sessionId": "<string>",
"paymentInstrumentId": "<string>",
"status": 1,
"action": {
"redirectUrl": "<string>",
"method": "GET",
"type": "ALIPAY",
"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>"
}
}"<string>"Create Payment
Create a one-time payment with an existing payment instrument, or omit paymentInstrumentId for payment methods that support automatic payment instrument creation. Use either productId and priceId, or amount and currency. To charge in a different payment currency, provide paymentCurrency and Clink will apply the available fixed multi-currency price or automatic currency conversion. You can provide billingAddress for the payment instrument and tax calculation.
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: <x-timestamp>' \
--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",
"billingAddress": {
"city": "San Francisco",
"region": "CA",
"country": "US",
"line1": "123 Market Street",
"line2": "Suite 100",
"postalCode": "94105"
},
"platformType": "WEB",
"deviceType": "Android"
}
'{
"code": 200,
"msg": "success",
"data": {
"orderId": "<string>",
"sessionId": "<string>",
"paymentInstrumentId": "<string>",
"status": 1,
"action": {
"redirectUrl": "<string>",
"method": "GET",
"type": "ALIPAY",
"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>"
}
}"<string>"Authorizations
Your secret API key obtained from the Clink dashboard (Developers section)
Headers
Current timestamp in milliseconds since Unix epoch (required for request signing)
"1783513683000"
Body
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. Use paymentCurrency to charge the customer in a different supported payment currency.
Payment method type. Supported values are uppercase. CARD (requires a previously saved card and its paymentInstrumentId).
ALIPAY, CARD, CASHAPP, GCASH, KAKAO, KCP, PIX, PROMPTPAY, QRIS, TNG, UPI, WECHAT URL where the customer is redirected after required payment actions.
Existing customer ID. At least one customer identifier is required.
Customer email. Used to resolve or create a customer when customerId is not provided.
Merchant-side customer ID used to resolve, create, or bind a customer.
Existing payment instrument ID. Required for payment methods that do not support automatic payment instrument creation. CARD requires a previously saved card and its paymentInstrumentId. Can be omitted for CASHAPP, GCASH, TNG, WECHAT, KAKAO, KCP, ALIPAY, QRIS, PROMPTPAY.
Predefined one-time price ID. If provided, productId is required.
Product ID. Required when priceId is provided.
Product and price line items for direct amount payments or display/risk data.
Show child attributes
Show child attributes
Direct payment amount. Required with currency when priceId is not provided.
Original pricing currency. Required with amount when priceId is not provided. If paymentCurrency is not provided, this currency is also used as the payment currency.
Optional target payment currency. When provided, Clink uses the configured fixed multi-currency price when available, otherwise automatically converts from the original pricing currency. The requested payment method must support the target currency.
"HKD"
Merchant-side reference ID for reconciliation.
Promotion code to apply.
Merchant metadata. Values must be strings.
Show child attributes
Show child attributes
Optional billing address used for the payment instrument and this payment's tax calculation. This address takes precedence over the existing payment instrument address, customer billing address, and request IP country for this payment. When Clink automatically creates a payment instrument, the address is saved to the new payment instrument. When paymentInstrumentId references an existing payment instrument, this address does not update that payment instrument.
Show child attributes
Show child attributes
Platform type. Supported values are WEB and WAP.
WEB, WAP Device type. Supported values are Android and iOS.
Android, iOS Response
Payment created successfully
Response status code, 200 when success
200
Brief description of what happened, 'success' when happy case
"success"
Response data returned after creating a one-time payment. It contains the order and session identifiers, together with the payment flow result.
Show child attributes
Show child attributes