Order Status API
The Order Status API enables you to check the current status of a specific order by providing its order ID. It returns information indicating whether the order has been successfully completed with payment details, is part of a split payment using PPE_INTENT, has no payment attempts yet, or if the payment has failed. Additionally, it handles cases where the provided order ID is invalid. This helps you reliably track and manage the order and take necessary actions based on its status.
Environment
| Environment | HTTP Method | API |
| Sandbox | GET | https://api-preprod.phonepe.com/apis/pg-sandbox/payments/v2/order/{merchantOrderId}/status |
| Production | GET | https://api.phonepe.com/apis/pg/payments/v2/order/{merchantOrderId}/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.
| Parameter Name | Description |
details | • true → return all attempt details under paymentDetails list • false → return only latest attempt details under paymentDetails list |
errorContext | • true → To receive the errorContext block with error details if the state is FAILED. • false → If the errorContext block is not required. |
merchantOrderId | Order ID created in a Payment request. |
Response
{
"orderId": "OMOxx",
"state": "COMPLETED",
"amount": 10000,
"expireAt": 1720767279548,
"metaInfo": {
"udf1": "",
"udf2": "",
"udf3": "",
"udf4": "",
"udf5": "",
"udf6": "",
"udf7": "",
"udf8": "",
"udf9": "",
"udf10": "",
"udf11": "",
"udf12": "",
"udf13": "",
"udf14": "",
"udf15": ""
},
"paymentDetails": [{
"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" : "XXXXXXXXXXX0945"
}
}]
}{
"orderId": "OMO2407121214395503786511",
"state": "FAILED",
"amount": 200,
"expireAt": 1720767279548,
"errorCode": "INVALID_MPIN", // Only present if the state is FAILED
"detailedErrorCode": "ZM", // Only present if the state is FAILED
"metaInfo": {
"udf1": "",
"udf2": "",
"udf3": "",
"udf4": "",
"udf5": "",
"udf6": "",
"udf7": "",
"udf8": "",
"udf9": "",
"udf10": "",
"udf11": "",
"udf12": "",
"udf13": "",
"udf14": "",
"udf15": ""
},
"paymentDetails": [
{
"transactionId": "OM2407121214579231302711",
"paymentMode": "UPI_COLLECT",
"timestamp": 1720766697944,
"amount": 200,
"payableAmount": 200,
"feeAmount": 0,
"state": "FAILED",
"errorCode": "INVALID_MPIN", // Only present if the state is FAILED
"detailedErrorCode": "ZM" // Only present if the state is FAILED
}
],
"errorContext": { // Only present if the state is FAILED
"errorCode" : "INVALID_MPIN",
"detailedErrorCode" : "ZM",
"source" : "CUSTOMER",
"stage" : "AUTHENTICATION",
"description" : "Wrong MPIN was entered"
}
}{
"orderId": "OMO2507241148405311106438",
"state": "COMPLETED",
"amount": 100,
"payableAmount": 100,
"feeAmount": 0,
"expireAt": 1753338820531,
"metaInfo":
{
"udf1": "Sharma",
"udf2": "30",
"udf3": "UDF3",
"udf4": "UDF4",
"udf5": "UDF5",
"udf6": "UDF6"
"udf7": "UDF7",
"udf8": "UDF8",
"udf9": "UDF9",
"udf10": "UDF10",
"udf11": "UDF11",
"udf12": "UDF12",
"udf13": "UDF13",
"udf14": "UDF14",
"udf15": "UDF15"
},
"paymentDetails":
[
{
"transactionId": "OM2507241150264011152620",
"paymentMode": "CARD",
"timestamp": 1753338026421,
"amount": 100,
"payableAmount": 100,
"feeAmount": 0,
"state": "COMPLETED",
"instrument":
{
"type": "CREDIT_CARD",
"bankId": "HDFC",
"brn": "520506406845",
"geoScope": "DOMESTIC",
"cardNetwork": "VISA",
"maskedCardNumber": "******1234"
},
"rail":
{
"type": "PG",
"authorizationCode": "088005"
},
"splitInstruments":
[
{
"instrument":
{
"type": "CREDIT_CARD",
"bankId": "HDFC",
"brn": "520506406845",
"geoScope": "DOMESTIC",
"cardNetwork": "VISA",
"maskedCardNumber": "******1234"
},
"rail":
{
"type": "PG",
"authorizationCode": "088005"
},
"amount": 100
}
]
}
]
}{
"orderId": "OMOxx",
"state": "CREATED",
"amount": 10000,
"expireAt": 1720767279548,
"metaInfo": {
"udf1": "",
"udf2": "",
"udf3": "",
"udf4": "",
"udf5": "",
"udf6": "",
"udf7": "",
"udf8": "",
"udf9": "",
"udf10": "",
"udf11": "",
"udf12": "",
"udf13": "",
"udf14": "",
"udf15": ""
}
}{
"success": false,
"code": "ORDER_NOT_FOUND",
"message": "No entry found for <MID>, <merchantOrderId>",
"data": {}
}| Field Name | Data Type | Description |
orderId | String | Payment Gateway generated internal order ID |
state | String | State of order, Expected Values = [PENDING, FAILED, COMPLETED] Note: Merchants should rely only on the root level “state” parameter for the Payment status confirmation. |
amount | String | Order amount in paisa |
expireAt | Long | Order expiry time in epoch |
metaInfo | Object | Merchant-defined meta information passed at the time of order creation |
paymentDetails | List | Contains a list of details of each payment attempt made corresponding to this order |
The metaInfo object contains additional parameters, which are explained in the table below.
| Parameter Name | Data Type | Description | Mandatory (Yes/No) | Constraints |
metaInfo.udf1-15 | String | Optional details you can add for more information | No | • Maximum length for Udf1-10 = 256 characters • Maximum length for Udf11-15 = 50 characters |
The paymentDetails list contains additional parameters, which are explained in the table below.
| Field Name | Data Type | Description |
paymentDetails[*].paymentMode | String | Mode of payment; Expected Values: • UPI_INTENT • UPI_COLLECT • UPI_QR • CARD • NET_BANKING |
paymentDetails[*].timestamp | Long | Transaction attempt timestamp in epoch |
paymentDetails[*].amount | Long | Amount in paisa, corresponding to payment attempt |
paymentDetails[*].transactionId | String | Internal transaction ID for given payment attempt |
paymentDetails[*].state | String | Transaction attempt state; Expected Values: • PENDING • COMPLETED • FAILED |
paymentDetails[*].errorCode | String | Error code (Only present when the transaction state is failed) |
paymentDetails[*].detailedErrorCode | String | Detailed Error Code (Only present when the transaction state is failed) |
paymentDetails[*].rail | Object | Contains processing rail details under which payment attempt is made |
paymentDetails[*].rail.type | String | Type of rail. Expected values: • UPI • PG |
paymentDetails[*].instrument | Object | Contains instrument details |
paymentDetails[*].instrument.type | String | Type of payment instrument; Expected values: • ACCOUNT • CREDIT_CARD • DEBIT_CARD • NET_BANKING |
Rail and Instrument Values for Each Payment Mode
"rail": {
"type": "UPI",
"utr": "<utr>",
"upiTransactionId": "upi12313",
"vpa": "12****78@ybl"
}"rail": {
"type": "PG",
"transactionId": "<transactionId>",
"authorizationCode": "<authorizationCode>",
"serviceTransactionId": "<serviceTransactionId>"
}"instrument": {
"type": "ACCOUNT",
"accountType": "SAVINGS",
"maskedAccountNumber": "<maskedAccountNumber>",
"accountHolderName": "<accountHolderName>"
}"instrument": {
"type": "CREDIT_CARD",
"bankTransactionId": "<bankTransactionId>",
"bankId": "<bankId>",
"arn": "<arn>",
"brn": "<brn>"
}"instrument": {
"type": "DEBIT_CARD",
"bankTransactionId": "<bankTransactionId>",
"bankId": "<bankId>",
"arn": "<arn>",
"brn": "<brn>"
}"instrument": {
"type": "NET_BANKING",
"bankTransactionId": "<bankTransactionId>",
"bankId": "<bankId>",
"arn": "<arn>",
"brn": "<brn>"
}