Check Setup Order Status
This API allows you to check the status of a mandate after a subscription has been successfully set up. Once the mandate is created and the payment is debited, you can use this API to track the corresponding order status, including whether it is successful, pending, or failed.
API Endpoint
| Environment | HTTP Method | API |
| Sandbox | GET | https://api-preprod.phonepe.com/apis/pg-sandbox/checkout/v2/order/{merchantOrderId}/status |
| Production | GET | https://api.phonepe.com/apis/pg/checkout/v2/order/{merchantOrderId}/status |
Request
Request Headers
| 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.
Path Parameters
| Parameter Name | DataType | Mandatory | Description |
merchantOrderId | String | Yes | Unique orderId generated by the merchant to track the transactions. |
details | Boolean | No | • true → return all attempt details under paymentDetails list • false → return only latest attempt details under paymentDetails list |
Response
Sample Response
{
"orderId": "OMO2604141037458946131769V",
"state": "COMPLETED",
"currency": "INR",
"amount": 100,
"payableCurrency": "INR",
"payableAmount": 100,
"feeCurrency": "INR",
"feeAmount": 0,
"expireAt": 1776146265882,
"paymentFlow": {
"type": "SUBSCRIPTION_CHECKOUT_SETUP",
"merchantSubscriptionId": "Sub123",
"authWorkflowType": "TRANSACTION",
"amountType": "FIXED",
"maxAmount": 100,
"frequency": "ON_DEMAND",
"expireAt": 1779689282000,
"subscriptionId": "OMS2604141037458806131949V"
},
"paymentDetails": [
{
"transactionId": "OM2604141037482338791885V",
"paymentMode": "UPI_QR",
"timestamp": 1776143268272,
"currency": "INR",
"amount": 100,
"payableCurrency": "INR",
"payableAmount": 100,
"feeCurrency": "INR",
"feeAmount": 0,
"state": "COMPLETED",
"instrument": {
"type": "ACCOUNT",
"maskedAccountNumber": "XXXXXX6392",
"ifsc": "SBIN0011290",
"accountType": "SAVINGS",
"bankId": "SBIN"
},
"rail": {
"type": "UPI",
"utr": "610408034245",
"umn": "d908ccf63c21406f9f38b94f70994921@axl"
},
"splitInstruments": [
{
"instrument": {
"type": "ACCOUNT",
"maskedAccountNumber": "XXXXXX6392",
"ifsc": "SBIN0011290",
"accountType": "SAVINGS",
"bankId": "SBIN"
},
"rail": {
"type": "UPI",
"utr": "610408034245",
"umn": "d908ccf63c21406f9f38b94f70994921@axl"
},
"currency": "INR",
"amount": 100
}
]
}
],
"metaInfo": {
"udf1": "some meta info of max length 256",
"udf2": "some meta info of max length 256",
"udf3": "some meta info of max length 256",
"udf4": "some meta info of max length 256",
"udf5": "some meta info of max length 256",
"udf6": "some meta info of max length 256",
"udf7": "some meta info of max length 256",
"udf8": "some meta info of max length 256",
"udf10": "some meta info of max length 256",
"udf11": "some meta info of max length 50",
"udf12": "some meta info of max length 50",
"udf13": "some meta info of max length 50",
"udf14": "some meta info of max length 50",
"udf15": "some meta info of max length 50"
}
}Response Parameters
| Field Name | Data Type | Description |
orderId | String | Unique internal orderId generated by PhonePe Payment Gateway. |
state | String | Current status of the order. Expected Values: • PENDING • FAILED • COMPLETED |
| amount | Long | Total order amount in paise. |
| currency | String | Specifies the Currency used (INR) |
| expireAt | Long | order expiry time in epoch |
| metaInfo | Object | Merchant defined meta info passed at the time of order creation |
| paymentDetails | List | Contain list of details of each payment attempt made corresponding to this order. |
| paymentDetails[*].paymentMode | String | Mode of payment. Expected Values: • UPI_INTENT • UPI_QR |
| 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 transaction state is failed) |
| paymentDetails[*].detailedErrorCode | String | Detailed Error Code (Only present when transaction state is failed) |
Verify a Sample Payment Status!
headers
url params
What’s Next?
After retrieving the subscription order status, the next step is to check the current status of a subscription after it has been set up.