Check Order Status
PhonePe provides two types of order status APIs to help you track the progress of subscription-related actions:
- Subscription Order Status: Use this API to check the status of a subscription setup after initiating it. Since the customer completes the mandate through the PhonePe app, this API helps you track whether the subscription has been successfully created, is still pending user action, has failed, or is complete.
- Redemption Order Status : Once a redemption request is triggered against an active subscription, use this API to track its execution status. It helps you determine if the redemption has been notified to the customer (NOTIFIED) or successfully processed (COMPLETED), along with other key payment details.
Subscription Order Status
This API is used to retrieve the current status of a subscription order that has been placed.
After initiating a subscription setup request, it may take some time for the user to complete the mandate approval through the PhonePe app. This API helps the merchant track the progress or final outcome of that request. It provides status updates such as whether the subscription was successfully created, is still pending user action, has failed, or was completed.
Environment
| Environment | HTTP Method | API |
| Sandbox | GET | https://api-preprod.phonepe.com/apis/pg-sandbox/subscriptions/v2/order/{merchantOrderId}/status?details=true |
| Production | GET | https://api.phonepe.com/apis/pg/subscriptions/v2/order/{merchantOrderId}/status?details=true |
Request
| Header Name | Header Value |
| Content-Type | application/json |
| Authorization | O-Bearer <merchant-auth-token> |
| Parameter Name | Description |
merchantOrderId | Merchant-generated order ID provided during the Subscription Setup API call. |
curl --location 'https://api-preprod.phonepe.com/apis/pg-sandbox/subscriptions/v2/order/MO1709025691805/status?details=true' \
--header 'Accept: application/json' \
--header 'Authorization: O-Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHBpcmVzT24iOjE3MTIyNTM2MjU2NDQsIm1lcmNoYW50SWQiOiJWMlNVQlVBVCJ9.7aVzYI_f_77-bBicEcRNuYx093b2wCsgl_WFNkKqAPY'Response
{
"merchantId": "SWIGGY8",
"merchantOrderId": "MO1708797962855",
"orderId": "OMO2402242336055135042802",
"state": "COMPLETED",
"amount": 200,
"expireAt": 1708798385505,
"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"
},
"paymentFlow": {
"type": "SUBSCRIPTION_SETUP",
"merchantSubscriptionId": "MS1708797962855",
"authWorkflowType": "TRANSACTION",
"amountType": "FIXED",
"maxAmount": 200,
"frequency": "ON_DEMAND",
"expireAt": 1741345725943,
"subscriptionId": "OMS2502051638460659623138"
},
"paymentDetails": [
{
"transactionId": "OM2402242336055865042862",
"paymentMode": "UPI_INTENT",
"timestamp": 1708797965588,
"amount": 200,
"payableAmount": 200,
"feeAmount": 0,
"state": "COMPLETED",
"instrument": {
"type": "ACCOUNT",
"maskedAccountNumber": "XXXXXXXXXXX0945"
},
"rail": {
"type": "UPI",
"utr": "405554491450",
"vpa": "12****78@ybl",
"umn": "d519347eb2374125bcad6e69a42cc13b@ybl"
}
}
]
}{
"merchantId": "SWIGGY8",
"merchantOrderId": "MO1708797962855",
"orderId": "OMO2402242336055135042802",
"state": "FAILED",
"amount": 200,
"expireAt": 1708798385505,
"errorCode": "INVALID_MPIN",
"detailedErrorCode": "ZM",
"paymentFlow": {
"type": "SUBSCRIPTION_SETUP",
"merchantSubscriptionId": "MS1708797962855",
"authWorkflowType": "TRANSACTION",
"amountType": "FIXED",
"maxAmount": 200,
"frequency": "ON_DEMAND",
"expireAt": 1741345725943,
"subscriptionId": "OMS2502051638460659623138"
},
"paymentDetails": [
{
"transactionId": "OM2402242336055865042862",
"paymentMode": "UPI_INTENT",
"timestamp": 1708797965588,
"amount": 200,
"payableAmount": 200,
"feeAmount": 0,
"state": "FAILED",
"errorCode": "INVALID_MPIN",
"detailedErrorCode": "ZM"
}
]
}{
"merchantId": "SWIGGY8",
"merchantOrderId": "MO1708797962855",
"orderId": "OMO2402242336055135042802",
"state": "PENDING",
"amount": 200,
"expireAt": 1708798385505,
"paymentFlow": {
"type": "SUBSCRIPTION_SETUP",
"merchantSubscriptionId": "MS1708797962855",
"authWorkflowType": "TRANSACTION",
"amountType": "FIXED",
"maxAmount": 200,
"frequency": "ON_DEMAND",
"expireAt": 1741345725943,
"subscriptionId": "OMS2502051638460659623138"
},
"paymentDetails": [
{
"transactionId": "OM2402242336055865042862",
"paymentMode": "UPI_INTENT",
"timestamp": 1708797965588,
"amount": 200,
"payableAmount": 200,
"feeAmount": 0,
"state": "PENDING"
}
]
}| Parameter Name | Data Type | Description |
merchantId | String | A unique ID assigned to the merchant by the PhonePe system during the onboarding process. |
merchantOrderId | String | A unique orderId provided by the merchant when creating the order. This helps in tracking and managing the specific transaction across systems. |
orderId | String | An orderId generated by PhonePe. |
state | String | Possible value: • COMPLETED • FAILED • PENDING |
amount | Long | The amount provided by the merchant in Paise. |
expireAt | DateTime | Represents the time in epoch (milliseconds). |
errorCode | String | Indicates the reason for the failure. [PRESENT ONLY IF STATE = FAILED] |
detailedErrorCode | String | Provides a detailed explanation for the failure. |
MetaInfo | Array | Contains metadata provided by the merchant. |
paymentFlow | Object | Provides the detailed information of the subscription. |
paymentDetails | Array | Contains the details of the payment. |
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 paymentFlow object contains additional parameters, which are explained in the table below.
| Parameter Name | Data Type | Description |
paymentFlow.type | String | The type should be set to “SUBSCRIPTION_REDEMPTION” for redemption transactions. |
paymentFlow.merchantSubscriptionId | String | A unique subscriptionId provided by the merchant to identify and manage the subscription request. |
paymentFlow.amountType | String | Nature of redemption amount Possible Values: • FIXED • VARIABLE |
paymentFlow.maxAmount | Long | Specifies the maximum amount that can be debited from the customer’s account for each redemption cycle. |
paymentFlow.frequency | String | Defines how often the payment will be deducted from the customer’s account. |
paymentFlow.subscriptionId | String | A subscriptionId generated by PhonePe to uniquely identify the user’s subscription. |
Check Subscription Order Status!
Redemption – Order Status
This API helps merchants check the current status of a subscription redemption order. It returns details such as whether the order is COMPLETED, FAILED, or still PENDING.
| Environment | HTTP Method | API |
| Sandbox | GET | https://api-preprod.phonepe.com/apis/pg-sandbox/subscriptions/v2/order/{merchantOrderId}/status?details=true |
| Production | GET | https://api.phonepe.com/apis/pg/subscriptions/v2/order/{merchantOrderId}/status?details=true |
Request for Redemption
| Header Name | Header Value |
| Content-Type | application/json |
| Authorization | O-Bearer <merchant-auth-token> |
| Parameter Name | Description |
merchantOrderId | Merchant-generated order ID that was shared during the Redemption Notify API call. |
curl --location 'https://api-preprod.phonepe.com/apis/pg-sandbox/subscriptions/v2/order/MO1709025691805/status?details=true' \
--header 'Accept: application/json' \
--header 'Authorization: O-Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHBpcmVzT24iOjE3MTIyNTM2MjU2NDQsIm1lcmNoYW50SWQiOiJWMlNVQlVBVCJ9.7aVzYI_f_77-bBicEcRNuYx093b2wCsgl_WFNkKqAPY'Response for Redemption
{
"merchantId": "SWIGGY8",
"merchantOrderId": "SWIGGY122",
"orderId": "OMO2503162337146919338960",
"state": "NOTIFIED",
"amount": 100,
"expireAt": 1620891733101,
"paymentFlow": {
"type": "SUBSCRIPTION_REDEMPTION",
"merchantSubscriptionId": "MS121312",
"redemptionRetryStrategy": "STANDARD",
"autoDebit": true,
"validAfter": 1628229131000,
"validUpto": 1628574731000,
"notifiedAt": 1622539751586
},
"paymentDetails": []
}| Parameter Name | Data Type | Description |
merchantId | String | A unique ID assigned to the merchant by the PhonePe system during the onboarding process. |
merchantOrderId | String | A unique orderId provided by the merchant when creating the order. |
orderId | String | An orderId generated by PhonePe. |
state | String | Possible value: • NOTIFICATION_IN_PROGRESS • NOTIFIED |
amount | Long | The amount provided by the merchant in Paise. |
expireAt | DateTime | Represents the time in epoch (milliseconds). |
| Array | Provides the details of the subscription. |
| String | The type should be “SUBSCRIPTION_REDEMPTION“ for redemption-related actions. |
MetaInfo | Array | Contains metadata provided by the merchant. |
paymentFlow.merchantSubscriptionId | String | A unique subscriptionId provided by the merchant to identify and manage the subscription request. |
| String | STANDARD |
paymentFlow.maxAmount | Boolean | If true, PhonePe will handle the execution process. |
| DateTime | The start timestamp of the redemption window, provided in milliseconds. |
paymentFlow.subscriptionId | DateTime | The end timestamp of the redemption window, provided in milliseconds. |
paymentDetails | DateTime | The timestamp in milliseconds indicating when the customer was notified about the scheduled redemption. |
{
"merchantId": "SWIGGY8",
"merchantOrderId": "MO1232",
"orderId": "OMO12344",
"state": "COMPLETED",
"amount": 100,
"expireAt": 1620891733101,
"metaInfo": {
"udf1":
"udf2":
"udf3":
"udf4":
"udf5":
"udf6":
"udf7":
"udf8":
"udf9":
"udf10":
"udf11":
"udf12":
"udf13":
"udf14":
"udf15":
},
"paymentFlow": {
"type": "SUBSCRIPTION_REDEMPTION",
"merchantSubscriptionId": "MS121312",
"redemptionRetryStrategy": "CUSTOM",
"autoDebit": true,
"validAfter": 1628229131000,
"validUpto": 1628574731000,
"notifiedAt": 1622539751586
},
"errorCode":
"detailedErrorCode":
"paymentDetails": [
{
"amount": 100
"paymentMode": "UPI_MANDATE",
"timestamp": 1620891733101
"transactionId": "OM124",
"state": "COMPLETED", // FAILED, PENDING
"rail": {
"type": "UPI",
"utr": "2",
"vpa": "****@ybl", //add success@ybl/failure@ybl/pending@ybl here.
"umn": "544fcc8819d04cb08e26faa1fb07eee7@ybl"
},
"instrument": {
"type": "ACCOUNT",
"maskedAccountNumber": "XXX2312",
"ifsc": "VISA",
"accountHolderName": "Harshad",
"accountType": "SAVINGS"
},
"errorCode":
"detailedErrorCode":
}
]
}| Parameter Name | Data Type | Description |
merchantId | String | A unique ID assigned to the merchant by the PhonePe system during the onboarding process. |
merchantOrderId | String | A unique orderId provided by the merchant when creating the order. |
orderId | String | An orderId generated by PhonePe. |
state | String | Possible value: • COMPLETED • FAILED • PENDING |
amount | Long | The amount provided by the merchant in Paise. |
expireAt | DateTime | Represents the time in epoch (milliseconds). |
| Array | Provides the details of the subscription. |
MetaInfo | Array | Contains metadata provided by the merchant. |
| DateTime | Time (in milliseconds) when the customer got the notification about the redemption. |
| String | Error code shown if the status is FAILED. |
detailedErrorCode | String | A detailed explanation of the error code, shown only when the status is FAILED. |
paymentMode | String | The method used to collect payment for the subscription. |
transactionId | String | Unique transaction ID generated by PhonePe. |
state | String | The current status of the debit. |
rail | Array | Details of the payment instrument used and UMRN associated with the transaction. |
instrument | Array | Details of the customer’s bank account. |
errorCode | String | Error code provided when the payment attempt fails. |
detailedErrorCode | String | An error code description will appear if the attempt fails. |
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 paymentFlow object contains additional parameters, which are explained in the table below.
| Parameter Name | Data Type | Description |
| String | The type should be “SUBSCRIPTION_REDEMPTION“ for redemption-related actions. |
paymentFlow.merchantSubscriptionId | String | A unique subscriptionId provided by the merchant to identify and manage the subscription request. |
| Boolean | If set to true, PhonePe will handle the redemption execution automatically. |
| DateTime | The time (in milliseconds) when the redemption window starts. |
| DateTime | The time (in milliseconds) when the redemption window ends. |
Check Redemption Order status !
What’s Next?
After retrieving the subscription and redemption order statuses, the next step is to understand how the subscription cancellation process works. Head over to the next section to learn how to initiate and determine the outcome of a cancellation