Get Status API
Method: GET
Path: https://amazonpay.amazon.in/v2/pay/token?merchantId={MID}&merchantOrderId={orderId}
Description: This API determines the status of a charge or refund transaction by passing the appropriate Merchant ID and Order ID.
Polling Strategy
Merchants should keep invoking the Get Status API call with retry and exponential back off implementation until any one of the following is satisfied for the transaction
- Status received is Success or Failed or Expired.
- EDC Machine timer expires.
The combination of retry, exponential back-off, and jitter provides a resilient and responsive approach to handling transient failures in distributed systems. It allows clients to automatically recover from temporary issues without failing immediately, while also reducing the load on the system during periods of high demand or failures.
Suggested polling strategy
Status Query | Interval |
---|---|
1st | 15 seconds |
2nd | 25 seconds |
3rd | 30 seconds |
4th | 35 seconds |
5th | 40 seconds |
6th | 45 seconds |
7th | 50 seconds |
Nth | 55 seconds |
Request Samples
API Path
https://amazonpay.amazon.in/v2/pay/token?merchantId=<MID>&merchantOrderId=DQR123
Path Parameters
Parameter | Type | Description |
---|---|---|
merchantId | String | Your merchant ID |
merchantOrderId | String | Value: MerchantTxnId |
Response Parameters
Parameter | Type | Description |
---|---|---|
merchantId | String | Your merchant ID |
merchantOrderId | String | Unique ID sent in the Generate QR request |
status | String | Transaction status for - Charge ( SUCCESS / FAILED / PENDING / EXPIRED / NO_RECORD_FOUND / TXN_CANCELLED_AFTER_INITIATE / TXN_CANCELLED_BEFORE_INITIATE / TXN_NOT_INITIATED / InvalidArguments / InternalServerError ) |
amount | String | Amount passed in the Generate QR request |
Sample Response
Status | HTTP Status Code | Response | Description |
---|---|---|---|
SUCCESS | 200 | Transaction Success | |
FAILED | 200 | Transaction failed | |
PENDING | 200 | Transaction processing when there is a delay in getting response from the bank | |
EXPIRED | 200 | Token Expired | |
NO_RECORD_FOUND | 200 | Token not found - When there is an incorrect order ID passed | |
TXN_CANCELLED_AFTER_INITIATE | 200 | Token has been cancelled after transaction has been initiated on that token. | |
TXN_CANCELLED_BEFORE_INITIATE | 200 | Token has been cancelled before transaction has been initiated on that token | |
TXN_NOT_INITIATED | 200 | Token is still in generated state and no transaction has been |
Common Errors
Status | HTTP Status Code | Response | Description |
---|---|---|---|
InvalidArguments | 400 | When invalid parameter passed or parameter missing in the request | |
InternalServerError | 500 | Server encountered an unexpected error while processing the request. |
For more errors, refer to this.