This API is used to check the status of the transaction using transaction id.
It is mandatory for the merchant to check the status of a transaction post callback from Accept Payments 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
orPending
. WhenPending
, merchants should retry until the status changes toSuccess
orFailed
.
Header Name | Header Value |
---|---|
| application/json |
| SHA256("/v3/transaction/{merchantId}/{transactionId}/status" + |
Parameter Name | Type | Description | Mandatory |
---|---|---|---|
|
| Unique Merchant ID assigned to the merchant by PhonePe |
|
|
| Merchant |
|
Parameter Name | Type | Description |
---|---|---|
success | BOOLEAN | A boolean to indicate the success/failure of the request. |
|
| Please see the list of Transaction Status Response Codes below. You should base your decision on this parameter. |
|
| Short message about status of transaction |
|
| Unique Transaction ID generated by the merchant to track this request to PhonePe |
|
| Unique Merchant ID assigned to the merchant by PhonePe |
|
| Transaction amount in paise |
|
| Merchant Order Id |
|
| PhonePe transaction Id |
|
| Please ignore this. Use "code" parameter to get latest status of transaction. |
|
| 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. |
Code | Description |
---|---|
| Payment not initiated inside PhonePe |
| Invalid request |
| X-VERIFY header is incorrect |
| Something went wrong. Merchant needs to call Check Transaction Status to verify the transaction status. |
| Payment is successful or In case of refund - Refund is successful. |
| Payment failed |
| Payment is pending. It does not indicate failed payment. Merchant needs to call Check Transaction Status to verify the transaction status. |
| Payment declined by user. |
| Payment canceled by the merchant using Cancel API. |
| The payment failed due to the timeout |
Cross-check the amount which has been passed in forward payment path(Accept payment API) and in the response of Check Transaction Status API.