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.
API Description
Request Method: POST
Request Path: /open/api/address/payment
Request Parameters
Body 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 Parameter 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",
}Response Parameters
Body 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 |
| └─address | string | Payment address |
| └─orderNo | string | Order number |
| └─cryptoVolume | string | Crypto volume |
Response Parameter Example
{
"code": "0",
"msg": "success",
"model": {
"address": "TSVSnP6oPKMxoSvcJdhjNCsPotZ7MtXhy",
"orderNo": "300217519010756372049",
"cryptoVolume": 10.08000000
},
"traceId": "686cf5035f549bf8d62da15ea438468e",
"success": true,
"error": false
}Updated 4 days ago