跳转到主要内容
POST
/
payment-instrument
curl --request POST \
  --url https://uat-api.clinkbill.com/api/payment-instrument \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-Timestamp: <x-timestamp>' \
  --data '
{
  "customerId": "cus_xxxxx",
  "paymentInstrumentType": "CASHAPP",
  "customerName": "Alice Example",
  "metadata": {
    "source": "checkout"
  }
}
'
{
  "code": 200,
  "msg": "success",
  "data": {
    "id": "<string>",
    "customerId": "<string>",
    "card": {
      "last4": "<string>",
      "name": "<string>",
      "expiryYear": "<string>",
      "expiryMonth": "<string>",
      "scheme": "<string>",
      "funding": "<string>",
      "issuerRegion": "<string>",
      "issuerBank": "<string>",
      "billingAddress": {
        "city": "<string>",
        "country": "<string>",
        "line1": "<string>",
        "line2": "<string>",
        "postalCode": "<string>",
        "state": "<string>"
      }
    },
    "wallet": {
      "accountTag": "<string>"
    },
    "created": 123
  }
}
"<string>"

授权

X-API-KEY
string
header
必填

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

请求头

X-Timestamp
string
必填

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

示例:

"1783513683000"

请求体

application/json

Parameters required to create a payment instrument by API. Provide at least one of customerId, customerEmail, or referenceCustomerId.

paymentInstrumentType
enum<string>
必填

Payment instrument type. Supported values are uppercase. Card and browser-wallet payment instruments are not supported by this API.

可用选项:
ALIPAY,
CASHAPP,
GCASH,
KAKAO,
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.

customerName
string

Display name of the customer.

cpfName
string

CPF holder name. Required when paymentInstrumentType is PIX.

cpfNumber
string

CPF number. Required when paymentInstrumentType is PIX.

upiName
string

UPI account holder name. Required when paymentInstrumentType is UPI.

phoneNumber
string

Phone number for the UPI account. Required when paymentInstrumentType is UPI.

billingAddress
object

Billing address for the UPI account. Required when paymentInstrumentType is UPI. city, region, country, line1, and postalCode are required for UPI.

metadata
object

Merchant metadata. Values must be strings.

响应

Payment instrument created successfully

code
integer<int32>

Response status code, 200 when success

示例:

200

msg
string

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

示例:

"success"

data
object

Payment instrument information returned by the API.