Create Order (QR Code)
Introduction
Create order after user scan the QRcode.
API Description
Request Method:POST
Request Path:open/api/scan/payment
Parameters
Request Parameters
Parameter | Sign | Mandatory | Type | Length | Description |
---|---|---|---|---|---|
appId | Y | Y | string | 64 | AppId is unique for merchant |
sign | N | Y | string | 512 | Sign |
merchantOrderNo | Y | Y | string | 64 | Merchant order number (must be unique) |
qrCode | Y | Y | string | 512 | QR Code string |
amount | Y | Y | string | 20 | Order amount (unit as fiat currency, 1=1.00) |
currency | Y | Y | string | 20 | Fiat currency (unit of amount) |
userId | Y | Y | string | 64 | UserId is unique for user (email / phone number) |
userIp | Y | Y | string | 64 | User IP address |
N | N | string | 64 | User email (Required when using VND Currency) | |
feeType | Y | Y | string | 32 | Inner Buckle: |
callbackUrl | Y | Y | string | 128 | The address receiving order webhook |
customParam | N | N | string | 1024 | Custom fields |
Example
{
"appId": "TEST000001",
"sign": "TEST000001",
"merchantOrderNo": "11187",
"amount": "100000",
"currency": "VND",
"feeType":"INNER_BUCKLE",
"qrCode": "00020101021138580010A000000727012800069704070114190360421800120208QRIBFTTA53037045802VN830084006304EDC5",
"userId": "[email protected]",
"userIp": "14.232.142.199",
"email": "[email protected]",
"callbackUrl": "http://127.0.0.1:8022/open/api/callback",
"customParam": {}
}
Response Parameters
Parameter | Type | Description |
---|---|---|
success | boolean | Success |
error | boolean | Error |
code | long | Response code |
msg | string | Response message |
traceId | string | Trace id |
model | object | Response content |
Model Response Parameters
Parameter | Type | Description |
---|---|---|
amount | string | Order amount (USDT) |
orderNo | string | Order number |
Example
{
"code": "0",
"msg": "success",
"model": {
"amount": 0.78,
"orderNo": "400017452047901950404"
},
"traceId": "6805b6349f57da09af484497f3ea6136",
"error": false,
"success": true
}
Updated 5 days ago