Check Setup Order Status


  • This API helps you check whether the subscription has been successfully created, is still pending user action, has failed, or is complete.
  • Once the customer completes the mandate through Payment Service Provider( PhonePe, BHIM, GPay, Paytm, CRED, Amazon Pay) app, use this API to check the status of a subscription setup after initiating it.
EnvironmentHTTP MethodAPI
SandboxGEThttps://api-preprod.phonepe.com/apis/pg-sandbox/checkout/v2/order/{merchantOrderId}/status
ProductionGEThttps://api.phonepe.com/apis/pg/checkout/v2/order/{merchantOrderId}/status
Request Headers
Header NameHeader Value
Content-Typeapplication/json
AuthorizationO-Bearer <merchant-auth-token>
Request Parameters
Parameter NameDataTypeMandatoryDescription
merchantOrderIdStringYesunique merchant order Id generated by the merchant.
detailsBooleanNotrue → return all attempt details under paymentDetails list
false → return only latest attempt details under paymentDetails list
Sample Response
{
    "merchantId": "INFINITYSTORE",
    "merchantOrderId": "subs_367374027",
    "orderId": "OMO2506201602348278355126",
    "state": "PENDING",
    "amount": 200,
    "expireAt": 1750417054786,
    "paymentFlow": {
        "type": "SUBSCRIPTION_CHECKOUT_SETUP",
        "merchantSubscriptionId": "subs_193436354",
        "authWorkflowType": "PENNY_DROP",
        "amountType": "VARIABLE",
        "maxAmount": 49900,
        "frequency": "ON_DEMAND",
        "expireAt": 2065948354000,
        "subscriptionId": "OMS2506201602348258355908"
    },
    "paymentDetails": [
        {
            "transactionId": "OM2506201602348628355930",
            "paymentMode": "UPI_INTENT",
            "timestamp": 1750415554863,
            "amount": 200,
            "payableAmount": 200,
            "feeAmount": 0,
            "state": "PENDING"
        }
    ]
}
Response Parameters
Field NameData TypeDescription
orderIdStringPG generated internal order id
stateStringState of order, Expected Values:
PENDING
FAILED
COMPLETED
amountLongOrder amount in paisa
expireAtLongorder expiry time in epoch
metaInfoObjectMerchant defined meta info passed at the time of order creation
paymentDetailsListContain list of details of each payment attempt made corresponding to this order.
paymentDetails[*].paymentModeStringMode of payment. Expected Values:
UPI_INTENT
UPI_QR
paymentDetails[*].timestampLongTransaction attempt timestamp in epoch
paymentDetails[*].amountLongAmount in paisa, corresponding to payment attempt
paymentDetails[*].transactionIdStringinternal transaction id for given payment attempt
paymentDetails[*].stateStringTransaction attempt state. Expected Values:
PENDING
COMPLETED
FAILED
paymentDetails[*].errorCodeStringError code (Only present when transaction state is failed)
paymentDetails[*].detailedErrorCodeStringDetailed Error Code (Only present when transaction state is failed)
headers
url params

After retrieving the subscription order status, 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

Is this article helpful?