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
Request Headers
| Header Name | Header Value |
| Content-Type | application/json |
| Authorization | O-Bearer <merchant-auth-token> |
Request Parameters
| 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. |
Try it yourself!
headers
url params
Response
Case 1: Order is completed
{
"orderId": "OMOxx",
"state": "COMPLETED",
"amount": 10000,
"expireAt": 1720767279548,
"metaInfo": {
"udf1": "",
"udf2": "",
"udf3": "",
"udf4": "",
"udf5": ""
},
"paymentDetails": [{
"paymentMode" : "UPI_QR",
"transactionId" : "OM12334",
"timestamp": 12121212,
"amount": 10000,
"state" : "COMPLETED",
"rail" : {
"type" : "UPI",
"upiTransactionId" : "upi12313",
"vpa" : "abcd@ybl"
},
"instrument" : {
"type" : "ACCOUNT",
"accountType" : "SAVINGS",
"accountNumber" : "121212121212"
}
}]
}Case 2: Order is failed
{
"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": ""
},
"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"
}
}Case 3: Response for Payment Mode: CARD
{
"orderId": "OMO2507241148405311106438",
"state": "COMPLETED",
"amount": 100,
"payableAmount": 100,
"feeAmount": 0,
"expireAt": 1753338820531,
"metaInfo":
{
"udf1": "Pradeep Vr",
"udf2": "30",
"udf3": "UDF3",
"udf4": "UDF4",
"udf5": "UDF5"
},
"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
}
]
}
]
}Case 4: No payment attempt is made for the order
{
"orderId": "OMOxx",
"state": "CREATED",
"amount": 10000,
"expireAt": 1720767279548,
"metaInfo": {
"udf1": "",
"udf2": "",
"udf3": "",
"udf4": ""
}
}Case 5: Invalid Order ID
{
"success": false,
"code": "ORDER_NOT_FOUND",
"message": "No entry found for <MID>, <merchantOrderId>",
"data": {}
}Response Parameters
| 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 |
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 = “UPI”, When payment Mode = [UPI_INTENT, UPI_COLLECT, UPI_QR]
"rail": {
"type": "UPI",
"utr": "<utr>",
"upiTransactionId": "upi12313",
"vpa": "abcd@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>"
}