Change in order status
A webhook is pushed when an order's status changes. The data structure is as follows:
Data parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| merchantOrderId | String | Y | Merchant's Order Id |
| orderId | String | Y | Order ID |
| userId | String | Y | User ID |
| fiatCurrency | String | Y | Fiat currency |
| cryptoCurrency | String | Y | Cryptocurrency |
| fiatAmount | String | Y | Fiat amount |
| cryptoAmount | String | Y | Cryptocurrency amount |
| orderFee | String | Y | Transaction fee |
| price | String | Y | Price |
| payWayCode | String | Y | Payment method |
| state | String | Y | Order status: CREATEED: Order created successfully (only push to bottom warehouse merchants) PROCESSING: 3DS Payment Link Generated FAILED: Payment failed SUCCESSED: Payment successful, awaiting coin transfer (Pushed after payment by underlying merchants) CHAIN_WITHDRAW_WAIT: Coin transfer in progress (Pushed after payment by on-chain merchants) COMPLETED: The order is completed, and the coin transfer is successful or failed. CONVERSION_FAILED: Hedging failed |
| errorCode | String | N | Error code for payment failure. |
| errorMessage | String | N | Error information |
| completedTime | String | N | Order execution time |
| createTime | String | Y | Creation time |
| updateTime | String | Y | Last update time |
| network | String | Y | Network |
| address | String | Y | Withdrawal address |
| tag | String | N | tag address |
| merchantUser | String | N | User's unique tag on the merchant side |
| txId | String | N | On-chain transfer transaction ID |
| networkFee | String | N | On-chain gas fee |
| chainArrivalTime | String | N | On-chain crediting time |
| actualReceivedAmount | String | Y | Actual amount received |
| threeDsRedirectUrl | String | N | 3DS link |
| orderCallBackUrl | String | Y | Webhook callback address |
| privateSecret | String | N | App private secret |
| appid | String | N | appId |
Output parameters
When a merchant receives a webhook push, it needs to return the following parameters. The data format is not required.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| code | String | Y | Status code. Success: 00000 |
| data | Object | N | Business parameters |
| msg | String | Y | Note |
| requestTime | Long | Y | Interface response timestamp |