This API is used for checking the status of an existing transaction.
Request Headers
Header Name | Header Value |
---|---|
| application/json |
| SHA256("/pg/v1/status/{merchantId}/{transactionId}" + saltKey) + "###" + saltIndex |
| Unique Merchant ID assigned to the merchant by PhonePe |
Path Parameters
Parameter Name | Type | Description | Mandatory |
---|---|---|---|
|
| Unique Merchant ID assigned to the merchant by PhonePe |
|
|
| Merchant |
|
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. |
|
| Response code explaining reason for status. |
|
| Message giving more information about the code. |
|
| Unique Merchant ID assigned to the merchant by PhonePe |
|
| Unique Transaction ID generated by the merchant to track this request to PhonePe |
|
| Transaction id generated by PhonePe |
|
| Transaction amount in paise |
|
| Current state of the transaction |
|
| Meta data of state. This is an informative value. |
|
| 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 |