Native API Integration
Introduction
Merchant can use this API for create order. In this mode, the whole payment process would be done in merchant pages.
MUST Keep theorderNo
from response, it is uniquely identifies for order query.
Path
Request Method: POST
Request Path: open/api/address/payment
Parameters
Request parameters
Parameter | Sign | Mandatory | Type | Length | Remarks |
---|---|---|---|---|---|
appId | Y | Y | string | 64 | AppId is uniqle for merchant |
sign | N | Y | string | 256 | |
merchantOrderNo | Y | Y | string | 64 | Customer transaction ID, only number |
orderAmount | Y | Y | string | 64 | Order amount (amount unit: USD dollar) |
payCurrency | Y | Y | string | 64 | Currency of payment (check Supported payCurrency) |
userId | Y | Y | string | 128 | UserId is uniqle for user (email / phone number) |
paymentTokens | Y | N | string | 128 |
|
userIp | N | Y | string | 32 | User IP address |
paymentNetworks | N | Y | string | 32 | Specify payment network(separated by comma) |
callbackURL | N | N | string | 512 | The address receiving order webhook |
customParam | N | N | string | 512 | Merchant custom parameters |
expiredTime | N | N | string | 32 | Time of expire (no more than 172800 second) |
orderModel | N | N | string | 32 | Order mode (ORDER/RECHARGE) capital letter required ORDER: order mode order would related to order amount strictly, order fails when user payment amount lower than order amount. |
Payment Methods
Payment Method | Payment Method Code |
---|---|
QR Code Payment | WALLET |
Supported payCurrency:
Currency | Regular | Example |
---|---|---|
USD | 2 non-zero decimal places after the decimal point | 100.12 |
EUR | 2 non-zero decimal places after the decimal point | 100.12 |
HKD | 2 non-zero decimal places after the decimal point | 100.12 |
IDR | integer | 1000 |
THB | integer | 1000 |
VND | integer | 1000 |
Token Name(USDT) | The token used for unit configured, 8 non-zero decimal places after the decimal point | 1.12345678 |
Request Example
{
"appId":"TEST000001",
"sign":"TEST000001",
"merchantOrderNo":"131222222222344345",
"userId":"[email protected]",
"orderAmount":"1",
"payCurrency":"USDT",
"paymentNetworks":"ETH",
"paymentTokens":"USDT",
"userIp":"106.37.115.196",
"expiredTime":"7200",
"callbackURL":"http://test.crypto.payment/open/api/callback",
}
Description of Response Parameters
Parameter | Type | Details |
---|---|---|
success | boolean | Success |
error | boolean | Error |
code | long | Response code |
msg | string | Response message |
traceId | string | Trace id |
model | object | Response details |
Response Example
{
"code": "0",
"msg": "success",
"model": {
"address": "0x0125a80d8d58b3ae6b5abb042fd720d0b76db122",
"orderNo": "300217292428921960389"
},
"traceId": "67122709fa1d0aec01251f21909b4b9f",
"error": false,
"success": true
}
Updated 10 days ago