Skip to content

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

  1. Status received is Success or Failed or Expired.
  2. 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

    Headers

    Path Parameters

    Parameter Type Description
    merchantId String Your merchant ID with Amazon Pay
    merchantOrderId String Value: MerchantTxnId

Response Parameters

Parameter Type Description
merchantId String Your merchant ID with Amazon Pay
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
{
  "merchantId": "<MID>",
  "merchantOrderId": "<orderId>",
  "status": "SUCCESS",
  "amount": 1.0
}
Transaction Success
FAILED 200
{
  "merchantId": "<MID>",
  "merchantOrderId": "<orderId>",
  "status": "FAILED",
  "amount": 1.0
}
Transaction failed
PENDING 200
{
  "merchantId": "<MID>",
  "merchantOrderId": "<orderId>",
  "status": "PENDING",
  "amount": 1.0
}
Transaction processing when there is a delay in getting response from the bank
EXPIRED 200
{
  "merchantId": "<MID>",
  "merchantOrderId": "<orderId>",
  "status": "EXPIRED",
  "amount": 1.0
}
Token Expired
NO_RECORD_FOUND 200
{
  "merchantId": "<MID>",
  "merchantOrderId": "<orderId>",
  "status": "NO_RECORD_FOUND",
  "amount": 1.0
}
Token not found - When there is an incorrect order ID passed
TXN_CANCELLED_AFTER_INITIATE 200
{
  "merchantId": "<MID>",
  "merchantOrderId": "<orderId>",
  "status": "TXN_CANCELLED_AFTER_INITIATE",
  "amount": 1.0
}
Token has been cancelled after transaction has been initiated on that token.
TXN_CANCELLED_BEFORE_INITIATE 200
{
  "merchantId": "<MID>",
  "merchantOrderId": "<orderId>",
  "status": "TXN_CANCELLED_BEFORE_INITIATE",
  "amount": 1.0
}
Token has been cancelled before transaction has been initiated on that token
TXN_NOT_INITIATED 200
{
  "merchantId": "<MID>",
  "merchantOrderId": "<orderId>",
  "status": "TXN_NOT_INITIATED",
  "amount": 1.0
}
Token is still in generated state and no transaction has been

Common Errors

Status HTTP Status Code Response Description
InvalidArguments 400
{
  "code": "InvalidArguments",
  "message": "merchantId field is mandatory, cannot be null or blank"
}
When invalid parameter passed or parameter missing in the request
InternalServerError 500
{
  "code": "InternalServerError",
  "message": "An internal server error has occurred. Try your request again later."
}
Server encountered an unexpected error while processing the request.

For more errors, refer to this.