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 the orderNo from response, it is uniquely identifies for order query.

Path

Request Method: POST

Request Path: open/api/address/payment

Parameters

Request parameters

ParameterSignMandatoryTypeLengthRemarks
appIdYYstring64AppId is uniqle for merchant
signNYstring256Sign
merchantOrderNoYYstring64Customer transaction ID, only number
orderAmountYYstring64Order amount (amount unit: USD dollar)
payCurrencyYYstring64Currency of payment (check Supported payCurrency)
userIdYYstring128UserId is uniqle for user (email / phone number)
paymentTokensYNstring1281. Specify payment token, multiple tokens can be transferred
2. After transfer, users can only use the listed tokens for payment
3. Must be included in the merchant configuration token table
4. Will work on both coin payment and exchange
userIpNYstring32User IP address
paymentNetworksNYstring32Specify payment network(separated by comma)
callbackURLNNstring512The address receiving order webhook
customParamNNstring512Merchant custom parameters
expiredTimeNNstring32Time of expire (no more than 172800 second)
Example:if the order expires in 1 hour, please upload 3600.
orderModelNNstring32Order mode (ORDER/RECHARGE) capital letter required

Payment Methods

Payment MethodPayment Method Code
QR Code PaymentWALLET

Supported payCurrency:

CurrencyRegularExample
USD2 non-zero decimal places after the decimal point100.12
EUR2 non-zero decimal places after the decimal point100.12
HKD2 non-zero decimal places after the decimal point100.12
IDRinteger1000
THBinteger1000
VNDinteger1000
Token Name(USDT)The token used for unit configured, 8 non-zero decimal places after the decimal point1.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

ParameterTypeDetails
successbooleanSuccess
errorbooleanError
codelongResponse code
msgstringResponse message
traceIdstringTrace id
modelobjectResponse details

Response Example

{
    "code": "0",
    "msg": "success",
    "model": {
        "address": "0x0125a80d8d58b3ae6b5abb042fd720d0b76db122",
        "orderNo": "300217292428921960389"
    },
    "traceId": "67122709fa1d0aec01251f21909b4b9f",
    "error": false,
    "success": true
}