Refund APIs
Initiate Refund
The Refund API allows you to initiate refunds for specific transactions, returning funds to customers for reasons like order cancellations, returns, or payment adjustments. This ensures smooth and direct refund processing through the payment gateway.
Environment for Initiate Refund
| Environment | HTTP Method | API |
| Sandbox | POST | https://api-preprod.phonepe.com/apis/pg-sandbox/payments/v2/refund |
| Production | POST | https://api.phonepe.com/apis/pg/payments/v2/refund |
Initiating Refund Request
| Header Name | Header Value |
| Content-Type | application/json |
| Authorization | O-Bearer <merchant-auth-token> |
⚠️ For Partner Integrations!
It is mandatory to include the X-MERCHANT-ID header with the MerchantID of the end merchant.
| Field Name | Data Type | Mandatory(Y/N) | Description | Constraints |
merchantRefundId | String | Yes | Unique merchant refund ID generated by the merchant | Max Length = 63 characters |
originalMerchantOrderId | String | Yes | Original merchant order ID against which refund is required | |
amount | Long | Yes | Amount in paisa to refund | Min Value = 100 |
{
"merchantRefundId": "Refund-id-12345",
"originalMerchantOrderId": "Order-12345",
"amount": 1234
}⚠️ Invalid Refund Amount!
The refund amount cannot exceed the initiated amount. It must always be less than or equal to the amount originally initiated.
Response
{
"refundId": "OMRxxxxx"
"amount": 1234,
"state": "PENDING"
}| Field Name | Data Type | Description |
refundId | String | PG generated internal refund ID |
amount | Long | Amount in paisa to refund |
state | String | Refund state; expected value = PENDING |
Try to Initiate Refund!
Refund Status API
The Refund Status API allows you to check the current status of a refund request. It helps you track whether the refund is pending, processed, failed, or completed, enabling you to keep your records up to date and provide accurate information to your customers.
Environment for Refund Status
| Environment | HTTP Method | API |
| 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 |
Refund Status Request
| Header Name | Header Value |
| Content-Type | application/json |
| Authorization | O-Bearer <merchant-auth-token> |
⚠️ For Partner Integrations!
It is mandatory to include the X-MERCHANT-ID header with the MerchantID of the end merchant.
Response
{
"originalMerchantOrderId": "Order123",
"amount": 100,
"state": "COMPLETED",
"timestamp": 1730869961754,
"refundId": "OMR7878098045517540996",
"errorCode": "", // Only present in case of ERROR
"detailedErrorCode": "", // Only present in case of ERROR
"splitInstruments": [
{
"amount": 100,
"rail": {
"type": "UPI",
"utr": "586756785",
"upiTransactionId": "YBL5bc011fa9f8644763b52b96a29a9655",
"vpa": "12****78@ybl"
},
"instrument": {
"type": "ACCOUNT",
"maskedAccountNumber": "******1234",
"accountType": "SAVINGS"
}
}
]
}{
"originalMerchantOrderId": "Order123",
"amount": 500,
"state": "COMPLETED",
"timestamp": 1730869961754,
"refundId": "OMR7878098045517540996",
"errorCode": "", // Only present in case of ERROR
"detailedErrorCode": "", // Only present in case of ERROR
"splitInstruments": [
{
"rail": {
"type": "UPI",
"utr": "586756785",
"upiTransactionId": "YBL5bc011fa9f8644763b52b96a29a9655",
"vpa": "12****78@ybl"
},
"instrument": {
"type": "ACCOUNT",
"maskedAccountNumber": "******1234",
"accountType": "SAVINGS"
},
"amount": 400
},
{
"rail": {
"type": "WALLET"
},
"instrument": {
"type": "WALLET"
},
"amount": 100
}
]
}{
"originalMerchantOrderId": "TX1752742884088",
"amount": 50,
"state": "COMPLETED",
"refundId": "OMR2507211657281836129569",
"timestamp": 1753097248198,
"splitInstruments": [
{
"instrument": {
"type": "NET_BANKING",
"bankId": "SBIN",
"brn": "brn123"
},
"rail": {
"type": "PG"
},
"amount": 50
}
],
"paymentDetails": [
{
"transactionId": "OMR2507211657281836129569",
"paymentMode": "NET_BANKING",
"timestamp": 1753097248198,
"amount": 50,
"state": "COMPLETED",
"instrument": {
"type": "NET_BANKING",
"bankId": "SBIN"
},
"rail": {
"type": "PG"
},
"splitInstruments": [
{
"instrument": {
"type": "NET_BANKING",
"bankId": "SBIN"
},
"rail": {
"type": "PG"
},
"amount": 50
}
]
}
]
}| Field Name | Data Type | Description |
originalMerchantOrderId | String | Original merchant order ID against which refund is initiated |
amount | Long | Amount in paisa to refund |
state | String | Refund state; Expected values: • PENDING • CONFIRMED • COMPLETED • FAILED |
| Long | Transaction attempt timestamp in epoch. |
| String | Refund Id generated by PhonePe. |
errorCode | String | Error code (Only present when transaction state is failed). |
| String | Detailed Error Code (Only present when transaction state is failed). |
| String | Contains processing rail details under which payment attempt is made. |
| String | Type of rail. Expected values • UPI • PG |
| String | Contains instrument details. |
| String | Type of payment instrument. Expected values : • ACCOUNT • CREDIT_CARD • DEBIT_CARD • NET_BANKING |