Check Payment Status

Used to check the status of the payment request.

Status against a particular MerchantId:TransactionId can be fetched using the transaction status API. Please refer below section for details.

It is mandatory for the merchant to check the status of a transaction.

  • The cashier should select the "check the transaction status" button which should call the terminal's server. Terminal's server should call PhonePe server with this API to know the status.
  • Add a message in the POS asking the cashier to click the Check Status button only after customer tells the cashier that he has made the payment.
  • The payment status can be Success, Failed or Pending.
  • When Pending, There should be a message POS "Payment is in progress, please check the status after sometime." (ideally, Collect expiry time - current time taken). "
  • For eg. let's assume the expiry time passed in collect request is 180 sec. Status is checked after 60 sec and payment is in pending state, the time to wait will 120 sec maximum since payment will be closed within 180 sec.

Request Headers

Header Name

Header Value

Content-Type

application/json

X-VERIFY

SHA256("/v3/transaction/{merchantId}/{transactionId}/status" +
saltKey) + "###" + saltIndex

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

Response Parameters

Parameter Name

Type

Description

success

BOOLEAN

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

code

ENUM

Please see the list of Transaction Status Response Codes below. You should base your decision on this parameter.

message

STRING

Short message about status of transaction

transactionId

STRING

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

merchantId

STRING

Unique Merchant ID assigned to the merchant by PhonePe

amount

LONG

Transaction amount in paise

providerReferenceId

STRING

PhonePe transaction Id

paymentState

ENUM

Transaction Status, Refer below section for list of states

payResponseCode

STRING

PhonePe internal status code. Please note this is a string value and new codes are likely to be added in the future. (Please don't do the marshalling/unmarshalling into an enum for this at your side). This is an informative value.

Transaction Status Response Codes

Code

Description

TRANSACTION_NOT_FOUND

Payment not initiated inside PhonePe

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

PAYMENT_PENDING

Payment is pending. It does not indicate failed payment.

PAYMENT_CANCELLED

Payment cancelled by merchant

PAYMENT_DECLINED

Payment declined by user

🚧

Cross-check the amount which has been passed in forward payment path(Accept payment API) and in the response of Check Transaction Status API.

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