Create Order

Description

Generate an order through this interface, we would return the web url, and the user pay at front end.

MUST Keep the orderNo from response, it is uniquely identifies for order query.

Path

Request Method: POST

Request Path: open/api/payment/V2

Parameters

Request parameters

ParameterSignMandatoryTypeLengthRemarks
appIdYYstring64AppId is uniqle for merchant
signNYstring256Sign
merchantOrderNoYYstring64Customer transaction ID, only number
orderAmountYYstring64Order amount (amount unit: dollar)
payCurrencyYYstring64Currency of payment (EUR / USD)
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
Check on supported token list
redirectURLNNstring512The redirection address after the successful purchase
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.
payTypeNNstring32Type of payment
paymentNetworksNNstring32Specify payment network(separated by comma)
Check on supported token list
orderModelNNstring32Order mode (ORDER/RECHARGE) capital letter required

Payment Methods

Payment MethodPayment Method Code
QR Code PaymentWALLET
Binance PayBINANCE_PAY

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

Request Example

{
    "appId": "TEST000001",
    "callbackURL": "https://90fc-111-10-154.ngrok-free.app/v1/xxxxx",
    "expiredTime": "60",
    "merchantOrderNo": "17236123450000",
    "orderAmount": "100",
    "orderModel": "ORDER",
    "payCurrency": "USD",
    "paymentTokens": "ETH",
    "redirectURL": "https://50xxxxx832.vicp.fun/platform/xxxxx",
    "sign": "07572BA8F945685E6BB57FC21FDE74E7217A015E00FD56176F3A500465817B33FAC086DA7887AC266BA8518960F0FE208DE1A8E105978B185A8D136DD0F6",
    "userId": "[email protected]"
}

Description of Response Parameters

ParameterTypeDetails
successbooleanSuccess
errorbooleanError
codelongResponse code
msgstringResponse message
traceIdstringTrace id
modelobjectResponse details
checkout addressstringcheckout web address

Response Example

{
    "code": "0",
    "model": {
        "orderNo": "300217236173748123456",
        "webUrl": "https://crypto-payment.alchemypay.org?orderNum=30012345678923456"
    },
    "msg": "success",
    "traceId": "66bc505e9f97eafb6ca69d123471cb"
}