Create Order

Introduction

Merchant can get checkout url for user to pay by this api.

Checkout url would be available for an hour.

This api is for create order and required merchant signature.

API Description

Request Method:POST

Request Path:/api/v3/purchase/orders

Request Body Parameter:

ParameterMandatoryDescription
marketplaceYMarket place code
merchantOrderNoYMerchant order number
toAddressYAddress of user to receive token
tokenYContract address of purchase token
symbolYSymbol
decimalsYToken purchase decimal places
iconYToken purchase icon url
─amountNAmount of purchase token(MEME)
Only type in one parameter of funds and amount
─fundsNThe quantity of purchase token(MEME) valued in terms of payment token
Only type in one parameter of funds and amount
buyGasN/
└─gasTokenNToken for payment
└─amountNAmount of purchase token, count as gasToken
checkoutSettingsYSetting of checkout
└─redirectURLYRedirect url, redirect user to after user payment success

Request Example:

{
    "marketplace": "4MEME_BNB", 
    "merchantOrderNo": "12345", 
    "toAddress": "0x111...111", 
    "token": "0x123...456", 
    "symbol": "PEPE",      
    "decimals": "18",      
    "icon": "...",          
//only pass one parameter between amount and funds
    "amount": "2000000000" 
    "funds": "2345000000", 
    "buyGas": {                //Optional
        "gasToken": "BNB", 
        "amount": "0.05"
    }
    "checkoutSettings": { 
        "redirectURL":"http://demo.xyz/product/", 
    }
}

Response Example:

{
    "data": {
        "id": "188164692*******969",
        "checkoutId": "188164********3968",
        "checkoutUrl": "https://testcheckout.aeon.xyz/checkoutPay?checkoutId=1881********23968"
    }
}