Get New Order

Submit Order

This function is used to generate payment data for a specific digital currency. Merchants can use the payment link to direct users to the UPay cashier for payment. Upon successful payment, the system will immediately notify the user of a successful payment.

Note: Users must pay strictly according to the order amount. If the payment amount is inconsistent, the order will not be processed.

Request Parameters

Request URL
https://api.qpay.ink/apply

Request Method
POST

Request Parameters

Name Field Type Is it required? Signature Description
AppId string Yes Yes Project APP ID
fiatAmount number Yes Yes USDT amount, accurate to 4 decimal places
chainType string No No trc20、erc20
merchantOrderNo string Yes Yes The order number generated independently by the merchant side must be unique on the merchant side.
notifyUrl string No No The callback address for receiving asynchronous notifications. It must be a directly accessible URL without parameters, session verification, or CSRF verification.
redirectUrl string No No After payment is successful, the front-end redirect address must include http:// or https://
timestamp string Yes Yes Timestamp, used to participate in signature calculation
signature string Yes Yes Data Signature,Refer to the signature algorithm below.
Signature Method (PHP)

              
function makeSignAPi($params, $appKey)
{

    $str = $params['AppId']
        .$params['merchantOrderNo']
        . $params['fiatAmount']
        . $params['timestamp'];
    return strtoupper(hash_hmac('sha256', $str, $appKey));
}
              
          
Refer to the above method to calculate the signature.

Response parameters

Response body structure:

{
    "code": 1,
    "message": "success",
    "data": {
         "orderNo": "20210721111111111111111111",
         "merchantOrderNo": "20210721111111111111111111",
         "status": "pending",
         "payUrl": "https://pay.qpay.com/pay/20210721111111111111111111",
            }
}
                    
orderNo: string, QPay order number.
merchantOrderNo: string, Merchant order number.
status: string, Order Status.
payUrl: string, Payment page, after receiving it, jump to this address to make payment.