IPN - Exchange

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

IndexEventStatusDescription
1exchange_order_placedPLACEDThe customer has accepted the quote, and the order status is updated to "placed".
2exchange_order_rejectedREJECTEDThe order is rejected due to incorrect order parameters or system-side issues, and the status is marked as "rejected".
3exchange_order_completedCOMPLETEDThe 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".
4exchange_order_failedFAILEDDue 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 NameTypeDescription
ipn_typestringType of notification, indicating the category "exchange".
eventstringSpecifies the event type, here as "exchange_order_place".
idstringUnique identifier for the exchange order.
quote_idstringIdentifier for the quote related to this exchange.
from_currencystringThe currency from which the amount is being exchanged (e.g., USDT).
to_currencystringThe currency to which the amount is being exchanged (e.g., ETH).
exchange_amountfloatThe amount of from_currency being exchanged.
exchange_ratefloatThe rate at which from_currency is exchanged to to_currency. Null if not applicable yet.
gross_amountfloatTotal amount before any fees. Null if not calculated yet.
feefloatTransaction fee for the exchange. Null if not calculated yet.
net_amountfloatThe amount received after deducting fees. Null if not applicable yet.
statusstringCurrent status of the order, "PLACED" in this case.
create_timestringTimestamp when the order was created.
notify_idstringUnique identifier for this notification event.
notify_timestringTimestamp when the notification was sent.