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
Parameter | Sign | Mandatory | Type | Length | Remarks |
---|---|---|---|---|---|
appId | Y | Y | string | 64 | AppId is uniqle for merchant |
sign | N | Y | string | 256 | Sign |
merchantOrderNo | Y | Y | string | 64 | Customer transaction ID, only number |
orderAmount | Y | Y | string | 64 | Order amount (amount unit: dollar) |
payCurrency | Y | Y | string | 64 | Currency of payment (EUR / USD) |
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 Check on supported token list |
redirectURL | N | N | string | 512 | The redirection address after the successful purchase |
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. |
payType | N | N | string | 32 | Type of payment |
paymentNetworks | N | N | string | 32 | Specify payment network(separated by comma) Check on supported token list |
orderModel | N | N | string | 32 | Order mode (ORDER/RECHARGE) capital letter required |
Payment Methods
Payment Method | Payment Method Code |
---|---|
QR Code Payment | WALLET |
Binance Pay | BINANCE_PAY |
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 |
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
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 |
checkout address | string | checkout web address |
Response Example
{
"code": "0",
"model": {
"orderNo": "300217236173748123456",
"webUrl": "https://crypto-payment.alchemypay.org?orderNum=30012345678923456"
},
"msg": "success",
"traceId": "66bc505e9f97eafb6ca69d123471cb"
}
Updated 19 days ago