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,FailedorPending. WhenPending, merchants should retry until the status changes toSuccessorFailed.
Request Headers
| Header Name | Header Value |
Content-Type | application/json |
Authorization | O-Bearer <merchant-auth-token> |
X-CLIENT-ID | This will vary corresponding to the merchants. The default value will be merchant ID. |
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. |
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 |
Transaction Status Response Codes
| Code | Description |
TRANSACTION_NOT_FOUND | Payment not initiated inside PhonePe |
INVALID_TRANSACTION_ID | Transaction ID sent is wrong. Need to send transaction ID as sent in the initiate API |
BAD_REQUEST | Invalid request |
AUTHORIZATION_FAILED | Authorization header is incorrect |
INTERNAL_SERVER_ERROR | Something went wrong. Merchant needs to call Check Transaction Status to verify the transaction status. |
PAYMENT_SUCCESS | Payment is successful or In case of refund – Refund is successful. |
PAYMENT_ERROR | Payment failed |
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 |
PAYMENT_CANCELLED | Payment cancelled by the merchant using Cancel API |
API_RATE_LIMIT_REACHED | If 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.