Check Status API

This API is used for checking the status of an existing transaction.

Request Headers

Header Name

Header Value

Content-Type

application/json

X-VERIFY

SHA256("/pg/v1/status/{merchantId}/{transactionId}" + saltKey) + "###" + saltIndex

X-MERCHANT-ID

Unique Merchant ID assigned to the merchant by PhonePe

Path Parameters

Parameter Name

Type

Description

Mandatory

merchantId

STRING

Unique Merchant ID assigned to the merchant by PhonePe

Yes

transactionId

STRING

Merchant transactionID for which status is to be fetched

Yes

Sample Response

{
  "success": true,
  "code": "PAYMENT_SUCCESS",
  "message": "Your payment is successful.",
  "data": {
    "merchantId": "MERCHANTUAT",
    "merchantTransactionId": "131be7df-a562-4d13-98fd-2096106376ff",
    "transactionId": "T2203091323362627236127",
    "amount": 100,
    "state": "COMPLETED",
    "responseCode": "PAYMENT_SUCCESS",
    "paymentInstrument": {
      "vpa": null,
      "maskedAccountNumber": "XXXXXXXXXX890125",
      "ifsc": "AABF0009009",
      "utr": "206850679072",
      "upiTransactionId": null
    }
  }
}
{
    "success": false,
    "code": "INTERNAL_SERVER_ERROR",
    "message": "There is an error trying to process your transaction at the moment. Please try again in a while."
}

Response Parameters

Parameter Name

Type

Description

success

BOOLEAN

A boolean to indicate the success/failure of the request.

code

ENUM

Response code explaining reason for status.
For status SUCCESS, only one possible response code is present - PAYMENT_SUCCESS
For status FAILURE, following response codes are possible:
BAD_REQUEST
AUTHORIZATION_FAILED
INTERNAL_SERVER_ERROR
TRANSACTION_NOT_FOUND
PAYMENT_ERROR
PAYMENT_PENDING
PAYMENT_DECLINED
TIMED_OUT

message

STRING

Message giving more information about the code.

merchantId

STRING

Unique Merchant ID assigned to the merchant by PhonePe

merchantTransactionId

STRING

Unique Transaction ID generated by the merchant to track this request to PhonePe

transactionId

STRING

Transaction id generated by PhonePe

amount

LONG

Transaction amount in paise

state

STRING

Current state of the transaction

responseCode

STRING

Meta data of state. This is an informative value.

paymentInstrument

OBJECT

Payment instrument with which payment was done

📘

Check Status API - Reconciliation [MANDATORY]

If the payment status is Pending, then the Check Status API should be called every 10secs once till 2mins and then in the following interval: 3min, 5min, 10min, and 15mins.

Error Codes

Code

Description

BAD_REQUEST

Invalid request

AUTHORIZATION_FAILED

X-VERIFY header is incorrect

INTERNAL_SERVER_ERROR

Something went wrong

PAYMENT_SUCCESS

Payment is successful

PAYMENT_ERROR

Payment failed

TRANSACTION_NOT_FOUND

The transaction id is incorrect

PAYMENT_PENDING

Payment is pending. It does not indicate failed payment. Merchant needs to call Check Transaction Status to verify the transaction status.

PAYMENT_DECLINED

Payment declined by user

TIMED_OUT

The payment failed due to the timeout

Language
Click Try It! to start a request and see the response here!