Payment API
Tips
- All requests are
Post
requests, and the data format isjson
Brief Description
This API allows merchants to initiate a payin transaction in Vietnam.
Request URL
/v1/payproVN/payin
Request Method
- POST
Header
Parameter | Required | Type | Description |
---|---|---|---|
merchantNo | Yes | string | Merchant number |
Request Body Parameters
Name | Required | Type | Description |
---|---|---|---|
sign | Yes | string | Use all fields except sign , sort them alphabetically, and concatenate as key1=value1key2=value2... . Then use the app secret as a salt for MD5 encryption. The sign should be in lowercase. |
timestamp | Yes | long | Timestamp of the transaction. |
amount | Yes | string | Amount (minimum 50000, no decimals). |
tradeNo | Yes | string | Unique transaction ID (recommended format: yyyymmddhhmmss+random number). |
bankName | Yes | string | Fixed value "VietQR". |
remark | No | string | Additional remarks (will be returned as is). |
notifyUrl | Yes | string | Asynchronous callback URL, e.g., https://www.abc.com/ . If not provided, the system will redirect to the default success page. |
Request Example
{
"amount": "50000",
"tradeNo": "133323392",
"notifyUrl": "1",
"bankName": "VietQR",
"sign": "82b217c2801f3c3ff490b733d2bfa296",
"timestamp": "1729153461856",
"remark":"test"
}
Response Parameters
Parameter Name | Required | Type | Description |
---|---|---|---|
msg | Yes | string | Request result (only indicates the success of the current request, not for merchant-side logic). |
code | Yes | string | Response code (only indicates the success of the current request, not for merchant-side logic). For specific error codes, refer to the business error code enumeration. |
timestamp | Yes | string | Transaction timestamp. |
success | Yes | string | Transaction result. |
data | Yes | Object | Returned object. |
data.platFormTradeNo | Yes | string | Unique platform transaction number. |
data.status | Yes | string | Request result. "0000" indicates success, "0015" indicates processing, and other values indicate error codes for failure handling. |
data.desc | Yes | string | Error description. |
data.remark | Yes | string | Request content returned (as is). |
data.paymentLink | Yes | string | Payment link, i.e., cashier link. |
Successful Response Example
{
"msg": "success",
"code": "0000",
"timestamp": 1729153481590,
"success": true,
"data": {
"platFormTradeNo": "jfr6npomvg2qaa49",
"status": "0015",
"desc": "CREATED",
"remark": "test",
"paymentLink": "https://www.196-189vn.info/vn/payment/VND70401VN055030692"
}
}