Subscription Order Status

This API is used to get the status of the Subscription order placed.

Host Details

EnvironmentValue
UAThttps://api-preprod.phonepe.com/apis/pg-sandbox
PRODhttps://api.phonepe.com/apis/pg

API Endpoint

/subscriptions/v2/order/{merchantOrderId}/status?details=true

Complete Host URL

Http Method: GET

EnvironmentValue
UAThttps://api-preprod.phonepe.com/apis/pg-sandbox/subscriptions/v2/order/{merchantOrderId}/status?details=true
PRODhttps://api.phonepe.com/apis/pg/subscriptions/v2/order/{merchantOrderId}/status?details=true

Request Details

Request Headers

Header NameHeader Value
Content-Typeapplication/json
AuthorizationO-Bearer <access_token>

Note: access_token can be generated using the Auth Token API. Refer here

Path Parameter Details

Parameter NameDescription
merchantOrderIdMerchant generated Order Id passed in Setup API

Sample CURL

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'

Sample Response for Order status – Success

{
    "merchantId": "SWIGGY8",
    "merchantOrderId": "MO1708797962855",
    "orderId": "OMO2402242336055135042802",
    "state": "COMPLETED",
    "amount": 200,
    "expireAt": 1708798385505,
    "paymentFlow": {
        "type": "SUBSCRIPTION_SETUP",
        "merchantSubscriptionId": "MS1708797962855",
        "authWorkflowType": "TRANSACTION",
        "amountType": "FIXED",
        "maxAmount": 200,
        "frequency": "ON_DEMAND",
        "subscriptionId": "OMS2402242336054995042603"
    },
    "paymentDetails": [
        {
            "transactionId": "OM2402242336055865042862",
            "paymentMode": "UPI_INTENT",
            "timestamp": 1708797965588,
            "amount": 200,
            "state": "COMPLETED",
            "instrument": {
                "type": "ACCOUNT",
                "maskedAccountNumber": "XXXXXXX20000",
                "accountHolderName": "ABC",
                "accountType": "SAVINGS"
            },
            "rail": {
                "type": "UPI",
                "utr": "405554491450",
                "vpa": "999@ybl",
                "umn": "d519347eb2374125bcad6e69a42cc13b@ybl"
            },
           "errorCode": <PRESENT ONLY IF TRANSACTION IS FAILED>
           "detailedErrorCode": <PRESENT ONLY IF TRANSACTION IS FAILED>
      }
    ]
}

Response Parameters

Parameter NameData TypeDescription
merchantIdSTRINGUnique Id assigned to the merchant in
the PhonePe system. Assigned during
merchant onboarding.
merchantOrderIdSTRINGUnique OrderId passed by the merchant
while creating the order.
orderIdSTRINGPhonePe generated orderID
stateSTRINGStatus of the Notification.
amountLONGPassed by the merchant in Paise
expireAtDateTimeEpoch Time (in milliseconds)
MetaInfoARRAYMetadata passed by the merchant only.
paymentFlowOBJECTDetail of Subscription.
paymentFlow.typeSTRINGType should be
“SUBSCRIPTION_REDEMPTION” for
redemption.
paymentFlow.merchantSubscriptionIdSTRINGSubscription ID passed by merchant
paymentFlow.amountTypeSTRINGNature of redemption amount
Possible Values:
● FIXED
● VARIABLE
paymentFlow.maxAmountLONGMax amount upto which redemptions will be allowed
paymentFlow.frequencySTRINGSubscription frequency
paymentFlow.subscriptionIdSTRINGPhonePe generated Subscription Id
paymentDetailsARRAYDetails of the payment