IPNs (Instant Payment Notifications) are sent to the notify_url specified by merchants during the setup process. Notifications occur when an exchange order is created or whenever there is a change in the status of an order.
1.Notification sent by gateway is in POST Method.
2.Body is a JSON-formatted string (content-Type: application/json)
Exchange Event Type
Index | Event | Status | Description |
---|---|---|---|
1 | exchange_order_placed | PLACED | The customer has accepted the quote, and the order status is updated to "placed". |
2 | exchange_order_rejected | REJECTED | The order is rejected due to incorrect order parameters or system-side issues, and the status is marked as "rejected". |
3 | exchange_order_completed | COMPLETED | The exchange order has been successfully executed, and the funds have been credited to the user's default account, with the order status marked as "completed". |
4 | exchange_order_failed | FAIL | Due to operational issues encountered during execution (such as market volatility or technical failures), the exchange order has failed to complete, and the status is updated to "fail". |
Example
{
"ipn_type": "exchange",
"event": "exchange_order_placed",
"id": "bcb68787-0ad5-4ec7-b89f-0a7215b17790",
"quote_id": "0f9397d3-1728-4ef3-9f67-a6f2bdd99bd5",
"from_currency": "USDT",
"to_currency": "ETH",
"exchange_amount": 30,
"exchange_rate": null,
"gross_amount": null,
"fee": null,
"net_amount": null,
"status": "PLACED",
"create_time": "2024-06-25T11:09:46.890273Z",
"notify_id": "9902d0fe-14c2-4ed1-b09f-27ddb276f6c1",
"notify_time": "2024-06-25T11:09:46.89753Z"
}
Description
Field Name | Type | Description |
---|---|---|
ipn_type | string | Type of notification, indicating the category "exchange". |
event | string | Specifies the event type, here as "exchange_order_place". |
id | string | Unique identifier for the exchange order. |
quote_id | string | Identifier for the quote related to this exchange. |
from_currency | string | The currency from which the amount is being exchanged (e.g., USDT). |
to_currency | string | The currency to which the amount is being exchanged (e.g., ETH). |
exchange_amount | float | The amount of from_currency being exchanged. |
exchange_rate | float | The rate at which from_currency is exchanged to to_currency . Null if not applicable yet. |
gross_amount | float | Total amount before any fees. Null if not calculated yet. |
fee | float | Transaction fee for the exchange. Null if not calculated yet. |
net_amount | float | The amount received after deducting fees. Null if not applicable yet. |
status | string | Current status of the order, "PLACED" in this case. |
create_time | string | Timestamp when the order was created. |
notify_id | string | Unique identifier for this notification event. |
notify_time | string | Timestamp when the notification was sent. |