This API is used to check the status of an order in the server. This is used for timeout scenarios where the order API response is not received. Card details can be received using the Activated Cards API, however it should be called only after checking the order status. If the order status is Success then activated cards API should be called to receive the card details, if any status other than Success is returned then the order must be cancelled.
Method: GET
URL/Path: baseurl/rest/v3/orders/{order_id}
Sample Request: For GET calls, request body is not required.
Request URL Parameters
Field Name | Data Type | Mandatory/Optional | Description | Example |
---|---|---|---|---|
refno | string | Mandatory | Reference number used to create order | 000000000001 |
Request Parameters – For GET calls, request parameters are not required.
Sample Response 200
{
"status": "COMPLETE",
"statusLabel": "Budgetree Complete",
"orderId": "333336022",
"refno": "1618994976162",
"cancel": {
"allowed": true,
"allowedWithIn": 2
}
}
Sample Response 400
{
"code": 5320,
"message": "Order not available",
"messages": []
}
Response Parameters
1. Success
Field Name | Data Type | Mandatory? | Description | Example |
status | string | no | This indicates the status of the requested order, which can be used to display it to the end customer. | PROCESSING |
statusLabel | string | yes | Label of the order status | COMPLETE |
orderId | string | no | Budgetree reference number | 1000000001 |
refno | string | no | Client reference number | 1000000001 |
cancel | object | |||
|
boolean | Indicates if an order can be cancelled | ||
|
string | 10 | Time allowed in which an order can be cancelled |
2. Failure
Field Name | Data Type | Mandatory | Description | Example |
code | number | no | Error Response Codes | 5320 |
message | string | no | Error Message | Order not available |
messages | array | no |
All Possible Status
Note: Please refer to Order API (Create) for length of response parameters.
Order Status | Description |
PENDING | This indicates the order is created, but hasn't initiated payment redemption. |
PROCESSING | This indicates payment is received, and cards are getting activated. |
CANCELED | This indicates the order is canceled, and money is reversed. |
COMPLETE | This indicates payment is received, and cards are activated. |
Status Code | Message | Description |
200 | Ok | This indicates the status of the order returned successfully. |
400 | Bad Request | This indicates request validations have failed. |
401 | Unauthorized | This indicates OAuth authorization failed to validate. |
403 | Forbidden | This indicates API access is revoked or insufficient permissions. |
500 | Internal Server Error | This indicates an error has occurred on budgetree . |
Status Code | Description |
5320 | Order not available |
Last updated on: