Refund Status

This API is used to check the status of an initiated refund request.

API Path and Method to be used

EnvironmentHttp MethodAPI Host URL
SandboxGEThttps://api-preprod.phonepe.com/apis/pg-sandbox/payments/v2/refund/{merchantRefundId}/status
ProductionGEThttps://api.phonepe.com/apis/pg/payments/v2/refund/{merchantRefundId}/status

Request Headers

Header NameHeader Value
Content-Typeapplication/json
AuthorizationO-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 } ] }
anchor image
Copied !
Header NameData TypeDescription
originalMerchantOrderIdStringOriginal merchant order id against which refund is initiated
amountLongRefund Amount (in Paise)
stateStringRefund state.
Possible values = [PENDING, CONFIRMED, COMPLETED, FAILED]
timestampDateTimeTransaction attempt timestamp in epoch
refundIdStringPhonePe generated Refund Id
errorCodeString[Optional] Error code
(Only present when transaction state is FAILED)
detailedErrorCodeString[Optional] Detailed Error Code
(Only present when transaction state is FAILED)
splitInstrumentsLISTContain list of details of the payment made corresponding to this refund.
splitInstruments.railStringContains processing rail details under which payment attempt is made.
splitInstruments.rail.typeStringType of rail. Expected values = [UPI, PG]
splitInstruments.instrument.typeStringType of payment instrument. Expected values = [ACCOUNT, CREDIT_CARD, DEBIT_CARD, NET_BANKING]