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

Sign
Check on About the sign

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

  1. 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

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)
Example:if the order expires in 1 hour, please upload 3600.

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.
RECHARGE: recharge mode order would count as success when received user token.And mark the payment amount as final result.

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
}