Skip to main content
POST

Authorizations

X-API-KEY
string
header
required

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

Headers

X-Timestamp
string
required

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

Example:

"1783513683000"

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. Use paymentCurrency to charge the customer in a different supported payment currency.

paymentMethodType
enum<string>
required

Payment method type (uppercase). CARD requires a previously saved card and its paymentInstrumentId. APPLEPAY and GOOGLEPAY require additionalPaymentInstrument.tokenValue and support automatic payment instrument creation.

Available options:
ALIPAY,
APPLEPAY,
CARD,
CASHAPP,
GCASH,
GOOGLEPAY,
KAKAO,
KCP,
PIX,
PROMPTPAY,
QRIS,
TNG,
UPI,
WECHAT
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.

paymentInstrumentId
string

Existing payment instrument ID. Required for CARD and other methods that do not support automatic creation. For APPLEPAY and GOOGLEPAY it is optional: when omitted, Clink creates the wallet payment instrument from additionalPaymentInstrument.tokenValue; if provided, it must belong to the customer and match paymentMethodType.

priceId
string

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

productId
string

Product ID. Required when priceId is provided.

productUrl
string

URL of the product page. Used for the product name link in the receipt email when the matching line item has no productUrl. Standard products fall back to the product's own productUrl when omitted. Must start with http:// or https:// (scheme is case-insensitive) and be at most 2048 characters. Requests whose productUrl uses any other scheme are rejected.

Maximum string length: 2048
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

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.

paymentCurrency
string

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.

Example:

"HKD"

merchantReferenceId
string

Merchant-side reference ID for reconciliation.

returnUrl
string
required unless paymentMethodType = APPLEPAY or GOOGLEPAY

URL where the customer is redirected after required payment actions. Required for all payment methods except APPLEPAY and GOOGLEPAY, which are settled synchronously and do not redirect.

additionalPaymentInstrument
object
required if paymentMethodType = APPLEPAY or GOOGLEPAY

Complete wallet token for APPLEPAY / GOOGLEPAY, as returned by the wallet SDK. The token is single-use: generate a new one for every payment attempt.

promotionCode
string

Promotion code to apply.

metadata
object

Merchant metadata. Values must be strings.

billingAddress
object

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.

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.