Callback API

Notify the caller when the order status changes using the provided callback_url, details for Payment->Create callback_url param

Callback event

Callback Event Name (event_name)Callback Event Type (event_type)Description
orderexpiredOrder Timeout Notification
orderpaidPayment Completed Notification

Request method

  • Method: HTTP POST
  • Content-Type: application/json
  • If the response is the string “success”, the callback is successful; otherwise, it fails.

Request parameters

NameTypeDescription
event_namestringEvent name
event_typestringEvent type
dataobjectOrder information
pidinteger(int64)Project ID
noncestring6 random string
timestampinteger(int64)Timestamp
signstringSignature

data Object

NameTypeDescription
cregis_idstringCregis unique id
order_idstringMerchant’s custom unique order ID.
receive_amountstringThe amount of the order after exchange rate conversion
receive_currencystringThe order currency code after exchange rate conversion
pay_amountstringActual Received Amount
pay_currencystringReceived currency
order_amountstringOrder transaction amount, defined by the merchant
order_currencystringOrder currency code, i.e. ISO 4217 currency code, such as CNY, HKD, defined by the merchant
exchange_ratestringExchange rate
payment_addressstringPayment wallet address
created_timeinteger(int64)Order creation time. 13-digit timestamp
cancel_timeinteger(int64)Order cancelled time. 13-digit timestamp
transact_timeinteger(int64)Order payment completed time. 13-digit timestamp
valid_timeintegerTo determine the order expiration time , if not specified, the order expiration time will be 30 minutes as default. Please input in minutes. Minimum is 10 minutes
statusstringOrder Status - new: Initial status of the order - paid: The order has been successfully paid - expired:The order has exceeded the valid time
remarkstringRemarks
tx_idstringTransaction hash
payer_idstringPayer unique ID
payer_namestringPayer’s name
payer_emailstringPayer email
Example
{
    "event_name": "order",
    "event_type": "paid",
    "data": {
        "cregis_id": "po20240703132452000",
        "order_id": "c9231e604da54469a735af3f449c880f",
        "receive_amount": "20.01",
        "receive_currency": "USDT",
        "pay_amount": "20.01",
        "pay_currency": "USDT",
        "order_amount": "100",
        "order_currency": "CNY",
        "exchange_rate": "7.0000000001",
        "payment_address": "0xd38c2cf366a731dcbe4a32c7ef24ff96d080ca7e",
        "created_time": 1719993183015,
        "cancel_time": null,
        "transact_time": 1719993183325,
        "valid_time": 30,
        "status": "paid",
        "payer_id": "p_001",
        "payer_name": "",
        "payer_email": "[email protected]"
        "remark":"Purchase Products",
        "tx_id": "0x0502f2bfd96cd0f55edea3343513940f3af7fe594eae77f08d2f46ea24829b11"
    }
}