Create Order

Description

Create order

🚧

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

Path

POST open/api/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

merchantOrderNo

Y

Y

string

64

Customer transaction ID, only number

orderAmount

Y

Y

string

64

Order amount (amount unit: cent)

payCurrency

Y

Y

string

64

Currency of payment (EUR / USD)

userId

Y

Y

string

128

UserId is uniqle for user (email / phone number)

paymentExchange

Y

N

string

512

Exchange Code and Wallet Code

  • Preconditions: Payment method has been configured with exchange _method/ wallet method
  1. Specify the exchange/ wallet, multiple transfers are acceptable
  2. Users can only use the specified exchange/wallet to pay under the exchange payment/wallet payment method by sending this parameter

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

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 (second)

payType

N

N

string

32

Type of payment

paymentNetworks

N

N

string

32

Specify payment network(separated by comma)

orderModel

N

N

string

32

Order mode (ORDER/RECHARGE) capital letter required

Payment Methods

Payment MethodPayment Method Code
QR Code PaymentWALLET
ExchangeEXCHANGE
Binance PayBINANCE_PAY
Wallet PaymentMESH_WALLET

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

Supported Token

CryptoNetwork
USDTTRX,BSC,ETH,SOL
USDCTRX,BSC,ETH,SOL
ETHETH,BSC
BTCBTC
PCIETH,PCI
TONTON

Exchange Code

ExchangeCode
Kraken16f021b0-f220-4bbb-aa3b-82d423301957
Paxos2fdd678d-8ece-49f5-992c-a1d7c4367833
Bybit3b8d8911-b2c0-4c1a-9127-675653c21960
Coinbase47624467-e52e-4938-a41a-7926b6c27acf
Robinhood6e192ebb-a073-4055-bbd7-d644539c9a20
Binance9226e5c2-ebc3-4fdd-94f6-ed52cdce1420

Wallet Code

WalletCode
Metamask34aeb688-decb-485f-9d80-b66466783394
Trust Wallet7f4307ea-58c6-4678-9eb2-fec205de5401
Coinbase Wallet6132432e-d59c-4555-9844-cea0ce600ba3
Uniswap Wallet58c89cae-b2ff-4176-85a3-1d1f7795cbe0
Blockchain Walletd22f63a1-50c0-4439-961c-870fc430c979
Bitcoin.com Walletf4b147b5-d166-4e6e-b4c1-e59d401cde11
Crypto.com Wallet Primee16f1dc8-7577-4170-a67f-5ebb266e410e
imToken7f523342-0bc6-4465-a035-bb4d2ed693ed
Rainbow8a60d227-2825-4158-b14b-3c8443a2b681

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"
}

Response Code

CodeExplain
0Success
1Payment abnormality
8000Parameter validation error
8003Content-type should be application/json
8004Request parameter format is incorrect. It needs to be JSON.
8007Signature error
8011Repeat merchantOrderNo
8012Illegal IP
8013Unsupported Crypto