Check Status API

It is mandatory for the merchant to check the status of a transaction post callback from Show Payments Page or Refund workflows.

  • Once customer is redirected back to merchant website, it is recommended to make a transaction status check with PhonePe backend systems to know the actual status of the payment and, then accordingly process the result.
  • The payment status can be Success, Failed or Pending. When Pending, merchants should retry until the status changes to Success or Failed.

<html-block html=”

Request Headers

“>

Header NameHeader Value
Content-Typeapplication/json
X-VERIFYSHA256(“/v3/transaction/{merchantId}/{transactionId}/status” +
saltKey) + “###” + saltIndex
X-CLIENT-IDThis will vary corresponding to the merchants. The default value will be merchant ID.

<html-block html=”

Path Parameters

“>

Parameter NameTypeDescriptionMandatory
merchantIdSTRINGUnique Merchant ID assigned to the merchant by PhonePeYes
transactionIdSTRINGMerchant transactionID for which status is to be fetchedYes

<html-block html=”

Response Parameters

“>

Parameter NameTypeDescription
successBOOLEANA boolean to indicate the success/failure of the request.
codeENUMPlease see the list of Transaction Status Response Codes below. You should base your decision on this parameter.
transactionId
STRINGUnique Transaction ID generated by the merchant to track this request to PhonePe
merchantIdSTRINGUnique Merchant ID assigned to the merchant by PhonePe
amountLONGTransaction amount in paise
providerReferenceIdSTRINGPhonePe transaction Id

<html-block html=”

Transaction Status Response Codes

“>

CodeDescription
TRANSACTION_NOT_FOUNDPayment not initiated inside PhonePe
INVALID_TRANSACTION_IDTransaction ID sent is wrong. Need to send transaction ID as sent in the initiate API
BAD_REQUESTInvalid request
AUTHORIZATION_FAILEDX-VERIFY header is incorrect
INTERNAL_SERVER_ERRORSomething went wrong. Merchant needs to call Check Transaction Status to verify the transaction status.
PAYMENT_SUCCESSPayment is successful or In case of refund – Refund is successful.
PAYMENT_ERRORPayment failed
PAYMENT_PENDINGPayment is pending. It does not indicate failed payment. Merchant needs to call Check Transaction Status to verify the transaction status.
PAYMENT_DECLINEDPayment declined by user
PAYMENT_CANCELLEDPayment cancelled by the merchant using Cancel API
API_RATE_LIMIT_REACHEDIf the API call limit is breached then HTTP status code 429 would be sent

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

{“method”:”get”,”url”:”/v3/transaction/{merchantId}/{transactionId}/status”,”auth”:”required”,”apiSetting”:”5da600be463ecf036287d7f3″,”examples”:{“codes”:[]},”results”:{“codes”:[{“status”:200,”language”:”json”,”code”:”{\n \”success\”: true,\n \”code\”: \”PAYMENT_SUCCESS\”,\n \”data\”: {\n \”transactionId\”: \”177f1c2f-ccf5-4c21-88bb-e3087c6e22c3sandip\”,\n \”merchantId\”: \”XXXXXXX\”,\n \”amount\”: 9300,\n \”providerReferenceId\”: \”T2006161957466544984324\”,\n \”paymentState\”: \”COMPLETED\”,\n \”payResponseCode\”: \”SUCCESS\”\n }\n}\n”,”name”:””},{“status”:400,”language”:”json”,”code”:”{}”,”name”:””}]},”params”:[{“name”:”merchantId”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”Unique Merchant ID assigned to the merchant by PhonePe”,”required”:false,”in”:”path”,”ref”:””,”_id”:”5da63a228f8d7e002439a0e0″},{“name”:”transactionId”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”Merchant transaction id for which status is to be fetched”,”required”:false,”in”:”path”,”ref”:””,”_id”:”5da63a228f8d7e002439a0df”},{“name”:”X-CLIENT-ID”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”This will vary corresponding to the merchants. The default value will be merchant ID”,”required”:false,”in”:”header”,”ref”:””,”_id”:”5da63a6dd53c94002767e6d7″},{“name”:”X-VERIFY”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”SHA256(\”/v3/transaction///status\” + saltKey) + \”###\” + saltIndex”,”required”:false,”in”:”header”,”ref”:””,”_id”:”5da63a6dd53c94002767e6d6″}]}
https://apps-uat.phonepe.com