Sandbox
Order Status Transition
Code
The Order Status Transition API allows merchants to manually transition order statuses in the sandbox environment for testing purposes. This API simulates various order state changes without requiring actual payment processing or blockchain transactions. Refer to the order status list 7.order-status.md
Request Body
| Field | Type | Mandatory | Remarks |
|---|---|---|---|
| externalOrderId | string | Yes | The unique order id from the partner side. Supports only letters and numbers. |
| targetStatus | int | Yes | The target status to transition to. Must be a positive integer. |
Response Body
| Field | Type | Remarks |
|---|---|---|
| success | boolean | Indicates if the request succeeded |
| code | string | Response code |
| message | string | Response message |
The API supports different status transitions based on the order type and business type. Below are the supported transitions:
1. BUY Orders (FIAT/P2P Business Type)
For Regular Withdraw Orders:
| Target Status Code | Status Name | Description |
|---|---|---|
| 2 | ON_RAMP_COMPLETED | purchase crypto completed successfully |
| 11 | WITHDRAW_PROCESSING | Withdrawal is being processed |
| 96 | WITHDRAW_ABANDONED | Withdrawal was abandoned |
| 97 | ON_RAMP_FAILED | purchase crypto failed |
| 98 | WITHDRAW_FAILED | Withdrawal failed |
| 20 | COMPLETED | Order fully completed |
For Swap Orders (Buy Any Token):
| Target Status Code | Status Name | Description |
|---|---|---|
| 2 | ON_RAMP_COMPLETED | purchase crypto completed successfully |
| 15 | SWAP_PROCESSING | Token swap is being processed |
| 93 | SWAP_ABANDONED | Token swap was abandoned |
| 94 | SWAP_FAILED | Token swap failed |
| 97 | ON_RAMP_FAILED | purchase crypto failed |
| 20 | COMPLETED | Order fully completed |
2. BUY Orders (CONVERT Business Type)
| Target Status Code | Status Name | Description |
|---|---|---|
| 4 | CONVERT_COMPLETED | Crypto conversion completed successfully |
| 11 | WITHDRAW_PROCESSING | Withdrawal is being processed |
| 92 | CONVERT_FAILED | Crypto conversion failed |
| 96 | WITHDRAW_ABANDONED | Withdrawal was abandoned |
| 98 | WITHDRAW_FAILED | Withdrawal failed |
| 20 | COMPLETED | Order fully completed |
3. SEND Orders (Send Crypto)
| Target Status Code | Status Name | Description |
|---|---|---|
| 20 | COMPLETED | Crypto sent successfully |
| 98 | WITHDRAW_FAILED | Crypto send failed |
Status Transition Flow
BUY Order (FIAT/P2P) - Regular Flow
Code
BUY Order (FIAT/P2P) - Swap Flow
Code
BUY Order (CONVERT) Flow
Code
SEND Order Flow
Code
Example 1: Transition order to completed status
Request Parameters:
Code
Response:
Code
Example 2: Transition order to pending status
Request Parameters:
Code
Response:
Code
Example 3: Transition order to failed status
Request Parameters:
Code
Response:
Code
Was this page helpful?
Last modified on