Initiate and Verify Refunds


Payment Link Refund allows you to return funds to customers for payments made through a payment link. You can easily initiate the refund and track its status through the API.

EnvironmentHTTP MethodAPI
SandboxPOSThttps://api-preprod.phonepe.com/apis/pg-sandbox/payments/v2/refund
ProductionPOSThttps://api.phonepe.com/apis/pg/payments/v2/refund
Request Headers
Header NameHeader Value
Content-Typeapplication/json
AuthorizationO-Bearer <merchant-auth-token>

⚠️ For Partner Integrations!


It is mandatory to include the X-MERCHANT-ID header with the MerchantID of the end merchant.

Request Parameters
Field NameData TypeMandatory(Y/N)DescriptionConstraints
merchantRefundIdStringYesA unique refund ID that you create to identify the refund request.Max Length = 63 characters
originalMerchantOrderIdStringYesThe merchant OrderId for which you want to initiate the refund.
amountLongYesThe amount to be refunded, specified in paisa.Min Value = 100
headers
body params

⚠️ 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 for Refund initiated successfully
{
    "refundId": "OMRxxxxx"
    "amount": 1234,
    "state": "PENDING"
}
Response Parameters
Field NameData TypeDescription
refundIdStringPayment Gateway generated internal order ID.
amountLongRefund amount specified in paisa.
stateStringIndicates the current state of the refund process. Expected value: PENDING.

Refund status provides information about the current progress of a refund request. It helps track whether the refund is still pending, completed, or failed, ensuring that merchants can monitor and manage the refund process effectively.

EnvironmentHTTP MethodAPI
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>
headers
url params
Case 1: Response for Original source of transaction = UPI
{
    "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"
            }
        }
    ]
}
Case 2: Response for Original source of transaction = PPE_INTENT
{
    "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
        }
    ]
}
Response Parameters
Field NameData TypeDescription
originalMerchantOrderIdStringThe original merchant order ID is used to identify the transaction for which the refund is being processed.
amountStringThe amount to be refunded, specified in paisa.
stateStringRefund state, Expected values:
PENDING
CONFIRMED
COMPLETED
FAILED
timestampLongTimestamp of the transaction attempt in epoch (in milliseconds).
refundIdStringRefund Id generated by PhonePe.
errorCodeStringError code returned only if the transaction state is FAILED.
detailedErrorCodeStringDetailed error code returned only when the transaction state is FAILED.
splitInstruments.railStringIncludes details of the processing rail used for the payment attempt.
splitInstruments.rail.typeStringSpecifies the type of processing rail used. Expected values:
UPI
PG
splitInstruments.instrumentStringIncludes the details of the payment instrument used for the transaction.
splitInstruments.instrument.typeStringSpecifies the type of payment instrument used. Expected values:
ACCOUNT
CREDIT_CARD
DEBIT_CARD
NET_BANKING

In this section, you’ve learned how to initiate a refund and check its status. In the next section, you’ll understand how payment verification is handled using webhooks, and how to manually verify the payment in case the webhook callback fails.

Is this article helpful?