Check Payment Link Status


The Payment Link Status API allows you to track the real-time status of a payment link you previously created. By passing the merchantOrderId, you can find out whether the payment is completed, pending, failed, expired, or still active with no attempts made.

Use this API to stay updated on your customer’s payment progress by providing details like the merchantOrderId

EnvironmentHTTP MethodAPI
SandboxGEThttps://api-preprod.phonepe.com/apis/pg-sandbox/paylinks/v1/{merchantOrderId}/status?details=[false or true]
ProductionGEThttps://api.phonepe.com/apis/pg/paylinks/v1/{merchantOrderId}/status?details=[false or true]
Path Parameters
Parameter NameDescription
detailsdetails = true → Returns all payment attempt details in the paymentDetails list.
details = false → Returns only the most recent payment attempt in the paymentDetails list.
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.

Response Header
Header NameHeader value
Content-Typeapplication/json
Case 1: Response for Order is completed
{
    "orderId": "OMOxx",
    "state": "COMPLETED",
    "amount": 10000,
    "metaInfo": {
        "udf1": "<additional-information-1>",
        "udf2": "<additional-information-2>",
        "udf3": "<additional-information-3>",
        "udf4": "<additional-information-4>",
        "udf5": "<additional-information-5>",
        "udf6": "<additional-information-6>",
        "udf7": "<additional-information-7>",
        "udf8": "<additional-information-8>",
        "udf9": "<additional-information-9>",
        "udf10": "<additional-information-10>",
        "udf11": "<additional-information-11>",
        "udf12": "<additional-information-12>",
        "udf13": "<additional-information-13>",
        "udf14": "<additional-information-14>",
        "udf15": "<additional-information-15>"
    },
    "expireAt": 1291391291,
    "paymentFlow": {
        "type": "PAYLINK",
        "paylinkUrl": "https://phon.pe/abc"
    },
    "paymentDetails": [
        {
            "paymentMode": "UPI_COLLECT",
            "timestamp": 12121212,
            "amount": 10000,
            "transactionId": "OM12333",
            "state": "FAILED",
            "errorCode": "AUTHORIZATION_ERROR",
            "detailedErrorCode": "ZM",
            "rail": {
                "type": "UPI",
                "upiTransactionId": "upi12313",
                "vpa": "12****78@ybl"
            },
            "instrument": {
                "type": "ACCOUNT",
                "accountType": "SAVINGS",
                "accountNumber": "******1234"
            }
        },
        {
            "paymentMode": "UPI_QR",
            "transactionId": "OM12334",
            "timestamp": 12121212,
            "amount": 10000,
            "state": "COMPLETED",
            "rail": {
                "type": "UPI",
                "upiTransactionId": "upi12313",
                "vpa": "12****78@ybl"
            },
            "instrument": {
                "type": "ACCOUNT",
                "accountType": "SAVINGS",
                "accountNumber": "******1234"
            }
        }
    ]
}
Case 2: Response for No payment attempt has been made for the Payment Link.
{
    "orderId": "OMOxx",
    "state": "ACTIVE",
    "amount": 10000,
    "expireAt": 1291391291,
    "metaInfo": {
        "udf1": "<additional-information-1>",
        "udf2": "<additional-information-2>",
        "udf3": "<additional-information-3>",
        "udf4": "<additional-information-4>",
        "udf5": "<additional-information-5>",
        "udf6": "<additional-information-6>",
        "udf7": "<additional-information-7>",
        "udf8": "<additional-information-8>",
        "udf9": "<additional-information-9>",
        "udf10": "<additional-information-10>",
        "udf11": "<additional-information-11>",
        "udf12": "<additional-information-12>",
        "udf13": "<additional-information-13>",
        "udf14": "<additional-information-14>",
        "udf15": "<additional-information-15>"
    }
}
Case 3: Response for Invalid order id.
{
    "code": "INVALID_MERCHANT_ORDER_ID",
    "message": "No entry found for given merchant order id"
}
Response Parameters
Parameter NameData TypeDescription
OrderIdStringPayment Gateway generated internal order ID.
stateStringRepresents the current status of the payment link. Possible values:
ACTIVE
FAILED
EXPIRED
COMPLETED
CANCELLED.
Note: Always refer to the state parameter to confirm the payment status.
amountStringOrder amount specified in paisa.
expireAtLongOrder expiry time in epoch.
metaInfoObjectMeta information means extra details you want to add for your own use. This information will be sent back to you in the status and callback responses.
paymentDetailsListContains a list of details for each payment attempt made for the corresponding order.

The metaInfo object contains additional parameters, which are explained in the table below.

Request Parameters of metoInfo Object:
Parameter NameData TypeDescriptionMandatory (Yes/No)Constraints
metaInfo.udf1-15StringOptional details you can add for more informationNoMaximum length for Udf1-10 = 256 characters
Maximum length for Udf11-15 = 50 characters

The paymentDetails object contains additional parameters, which are explained in the table below.

Request Parameters of paymentDetails Object:
Parameter NameData TypeDescription
paymentDetails.paymentModeStringThe payment method used. Expected values include:
UPI_INTENT
UPI_COLLECT
UPI_QR, CARD
TOKEN
NET_BANKING
paymentDetails.timestampLongThe timestamp of the transaction attempt, in epoch.
paymentDetails.amountLongThe amount in paisa for the payment attempt.
paymentDetails.transactionIdStringThe internal transaction ID associated with the given payment attempt.
paymentDetails.stateStringThe state of the transaction attempt. Expected values are:
PENDING
COMPLETED
FAILED
paymentDetails.errorCodeStringThe error code, which is provided only when the transaction state is “FAILED.”
paymentDetails.detailedErrorCodeStringThe detailed error code, which is provided only when the transaction state is “FAILED.” It gives more specific information about why the transaction failed.
paymentDetails.railStringContains details about the processing rail used for the payment attempt.
paymentDetails.rail.typeStringIndicates the type of payment rail used for the transaction. Expected values are:
• UPI
• PG
paymentDetails.instrumentStringContains details of the payment instrument used for the transaction.
paymentDetails.instrument.typeStringSpecifies the type of payment instrument used for the transaction. Expected values include:
ACCOUNT
CREDIT_CARD
DEBIT_CARD
NET_BANKING
Rail = “UPI”, When Payment Mode = [UPI_INTENT, UPI_COLLECT, UPI_QR]
"rail": {
    "type": "UPI",
    "utr": "<utr>",
    "upiTransactionId": "upi12313",
    "vpa": "12****78@ybl"
}
Rail = “PG”, When payment Mode = [CARD, TOKEN, NET_BANKING]
"rail": {
    "type": "PG",
    "transactionId": "<transactionId>",
    "authorizationCode": "<authorizationCode>",
    "serviceTransactionId": "<serviceTransactionId>"
}
Instrument = “ACCOUNT”, When payment Mode = [UPI_INTENT, UPI_COLLECT, UPI_QR]
"instrument": {
    "type": "ACCOUNT",
    "accountType": "SAVINGS",
    "maskedAccountNumber": "<maskedAccountNumber>",
    "accountHolderName": "<accountHolderName>"
}
Instrument = “CREDIT_CARD”, When payment Mode = [CARD, UPI_INTENT, UPI_COLLECT, UPI_QR]
"instrument": {
    "type": "CREDIT_CARD",
    "bankTransactionId": "<bankTransactionId>",
    "bankId": "<bankId>",
    "arn": "<arn>",
    "brn": "<brn>"
}
Instrument = “DEBIT_CARD”, When payment Mode = [CARD]
"instrument": {
    "type": "DEBIT_CARD",
    "bankTransactionId": "<bankTransactionId>",
    "bankId": "<bankId>",
    "arn": "<arn>",
    "brn": "<brn>"
}
Instrument = “NET_BANKING”, When payment Mode = [NET_BANKING]
"instrument": {
    "type": "NET_BANKING",
    "bankTransactionId": "<bankTransactionId>",
    "bankId": "<bankId>",
    "arn": "<arn>",
    "brn": "<brn>"
}
headers
url params

After checking the status of an order, you may need to handle post-payment actions like issuing a refund for failed, cancelled, or customer-returned transactions.

Head over to the next section to learn how to process cancel.

Is this article helpful?