Create pay-in
POST
/trade/payment/createRequest headers
Payment method values
paymentType |
|---|
KHQR |
KHQR_USD |
VA_USD |
VA_KHR |
Request parameters
| Field | Type | Required | Maximum length | Description |
|---|---|---|---|---|
merchantOrderNo | String | Yes | 32 | Merchant order number |
transactionAmount | String | Yes | 20 | Pay-in amount. KHR payment methods support integers only; USD payment methods support up to two decimal places. See Limits. |
paymentType | String | Yes | 24 | Payment method |
idType | String | No | 32 | Identity type: NONE_KYC or KYC |
userIdCard | String | Yes | 50 | Merchant-side user identifier containing 1–50 letters or digits. When idType is KYC, it must match the approved KYC record. |
userName | String | Yes | 64 | User name |
userPhone | String | Yes | 8–9 | User mobile number, 8–9 digits |
userEmail | String | Yes | 50 | User email |
bankCode | String | No | 64 | Bank codes |
bankAccountNo | String | No | 64 | Bank account number |
merchantName | String | No | 64 | Merchant name |
description | String | No | 100 | Description |
expireTime | String | No | - | Order expiration time (local time, format yyyy-MM-dd HH:mm:ss) |
paymentCallbackUrl | String | No | 200 | Pay-in callback URL |
Request example
{ "merchantOrderNo": "ORDER202609170001", "transactionAmount": "100", "paymentType": "KHQR", "idType": "NONE_KYC", "userIdCard": "USER123456", "userName": "TEST USER", "userPhone": "12345678", "userEmail": "user@example.com", "paymentCallbackUrl": "https://merchant.example/callback"}Response parameters
| Field | Type | Required | Maximum length | Description |
|---|---|---|---|---|
code | int | Yes | - | Status code; a value other than 200 indicates an error |
data | Object | Yes | - | Response body |
data.merchantOrderNo | String | Yes | 24 | Merchant order number |
data.tradeNo | String | Yes | 32 | Platform order number |
data.transactionAmount | String | Yes | - | Pay-in amount, an integer or up to two decimal places |
data.status | String | Yes | 24 | Order status |
data.paymentType | String | Yes | 24 | Payment method |
data.failMsg | String | No | 200 | Order failure reason |
data.paymentInfo | String | No | 200 | Payment information |
data.additional | Object | No | - | Additional information |
msg | String | No | - | Error message |
tid | String | Yes | - | Trace ID |
Response example
{ "code": 200, "data": { "merchantOrderNo": "ORDER202609170001", "tradeNo": "VS2608270002KH0000000000040059", "transactionAmount": "100.00", "status": "PAYING", "paymentType": "KHQR", "paymentInfo": "PAYMENT_INFORMATION" }, "msg": "success", "tid": "747bbf80261844ed85b809212aab0d81"}