Order Events

The currently supported event types are as follows:

order.paid
order.expired
order.failed


Please note that duplicate events MAY occur and in some occasions, may arrive out of order. We ask partners to de-dupe these events.


Order event defination:

NameTypeDescription
typestringevent type
payload.idstringorder id
payload.uidstringoptional custom order unique identifier, initialized when creating this order
payload.user_idstringoptional user id who pays this order, initialized after user paid this order
payload.wallet_idstringoptional wallet id from which to pay this order, initialized after user paid this order
payload.amount.currencystringcurrency code
payload.amount.amountstringcurrency amount, big interger in string representation
payload.failed_messagestringoptional failed reason for this order, initialized when the order failed
payload.metadataobjectoptional metadata for this order, initialized when creating this order
payload.created_atstringcreated time
payload.updated_atstringupdated time

Order Event samples:

{
    "type": "order.paid",
    "payload": {
        "id": "92841860-481e-4ba4-9be2-12b1e497facf",
        "uid": "order_1234",
        "user_id": "6872198",
        "wallet_id": "11b9ca57-0559-403a-bf8e-7bd1a31aff46",
        "amount": {
            "currency": "USDT",
            "amount": "10000"
        },
        "metadata": {
          "custom_key": "custom_value"
        },
        "created_at": "2024-02-14T12:00:00Z",
        "updated_at": "2024-02-14T12:01:00Z"
    }
}
{
    "type": "order.expired",
    "payload": {
        "id": "92841860-481e-4ba4-9be2-12b1e497facf",
        "uid": "order_1234",
        "amount": {
            "currency": "USDT",
            "amount": "10000"
        },
        "metadata": {
          "custom_key": "custom_value"
        },
        "created_at": "2024-02-14T12:00:00Z",
        "updated_at": "2024-02-14T12:01:00Z"
    }
}
{
    "type": "order.failed",
    "payload": {
        "id": "92841860-481e-4ba4-9be2-12b1e497facf",
        "uid": "order_1234",
        "amount": {
            "currency": "USDT",
            "amount": "10000"
        },
        "metadata": {
          "custom_key": "custom_value"
        },
        "failed_message": "insufficient balance",
        "created_at": "2024-02-14T12:00:00Z",
        "updated_at": "2024-02-14T12:01:00Z"
    }
}