This API is used to check the status of an initiated refund request.
API Path and Method to be used
Environment | Http Method | API Host URL |
---|---|---|
Sandbox | GET | https://api-preprod.phonepe.com/apis/pg-sandbox/payments/v2/refund/{merchantRefundId}/status |
Production | GET | https://api.phonepe.com/apis/pg/payments/v2/refund/{merchantRefundId}/status |
Request Headers
Header Name | Header Value |
---|---|
Content-Type | application/json |
Authorization | O-Bearer <merchant-auth-token> |
Path Parameters
merchantRefundId : Merchant Refund Id against which the status is to be fetched.
Sample Response
Refund Pending
Note: Merchants should rely only on the highlighted “state” parameter for the Refund status confirmation.
{
"originalMerchantOrderId": "Refund-12345",
"amount": 50000,
"state": "PENDING",
"timestamp": 1706629419799,
"refundId": "OMR7896789"
}
Refund Accepted
Note: Merchants should rely only on the highlighted “state” parameter for the Refund status confirmation.
{
"originalMerchantOrderId": "Refund-12345",
"amount": 50000,
"state": "CONFIRMED",
"timestamp": 1706629419799,
"refundId": "OMR7896789"
}
Refund Completed
Note: Merchants should rely only on the highlighted “state” parameter for the Refund status confirmation.
{
"originalMerchantOrderId": "Refund-12345",
"amount": 50000,
"state": "COMPLETED",
"timestamp": 1706629419799,
"refundId": "OMR7896789",
"errorCode": "", // Only present in case of ERROR
"detailedErrorCode": "", // Only present in case of ERROR
"splitInstruments": [
{
"rail": {
"type": "UPI",
"upiTransactionId": "upi12313",
"vpa": "abcd@ybl"
},
"instrument": {
"type": "ACCOUNT",
"accountType": "SAVINGS",
"maskedAccountNumber": "XXXXX1212"
},
"amount": 50000
}
]
}
Refund Failed
Note: Merchants should rely only on the highlighted “state” parameter for the Refund status confirmation. Also, splitInstruments parameter should be Optional as it may or many not be present.
{
"originalMerchantOrderId": "Refund-12345",
"amount": 50000,
"state": "FAILED",
"timestamp": 1706629419799,
"refundId": "OMR7896789",
"errorCode": "UPI_BACKBONE_ERROR", // Only present in case of ERROR
"detailedErrorCode": "UPI_1231", // Only present in case of ERROR
"splitInstruments": [ // In case of failure this is optional. It may or may not be present.
{
"rail": {
"type": "UPI",
"upiTransactionId": "upi12313",
"vpa": "abcd@ybl"
},
"instrument": {
"type": "ACCOUNT",
"accountType": "SAVINGS",
"maskedAccountNumber": "XXXXX1212"
},
"amount": 50000
}
]
}
Response Parameters
Copied !
Header Name | Data Type | Description |
---|---|---|
originalMerchantOrderId | String | Original merchant order id against which refund is initiated |
amount | Long | Refund Amount (in Paise) |
state | String | Refund state. Possible values = [PENDING, CONFIRMED, COMPLETED, FAILED] |
timestamp | DateTime | Transaction attempt timestamp in epoch |
refundId | String | PhonePe generated Refund Id |
errorCode | String | [Optional] Error code (Only present when transaction state is FAILED ) |
detailedErrorCode | String | [Optional] Detailed Error Code (Only present when transaction state is FAILED ) |
splitInstruments | LIST | Contain list of details of the payment made corresponding to this refund. |
| String | Contains processing rail details under which payment attempt is made. |
| String | Type of rail. Expected values = [UPI, PG] |
| String | Type of payment instrument. Expected values = [ACCOUNT, CREDIT_CARD, DEBIT_CARD, NET_BANKING] |