Fetch All Subscriptions

To fetch all the subscription for a user

Request Headers

Header NameHeader Value
Content-Typeapplication/json
X-VERIFYSHA256(“/v3/recurring/subscription/user/{merchantId}/{merchantUserId}/all” + saltKey) + “###” + saltIndex

Path Parameters

Parameter NameTypeDescriptionMandatory
merchantIdSTRINGUnique Merchant ID assigned to the merchant by PhonePeYes
merchantUserIdSTRINGUnique User Id linked with PhonePeYes
{
  "success": true,
  "code": "SUCCESS",
  "message": "Your request has been successfully processed.",
  "data": {
    "subscriptions": [
      {
        "merchantSubscriptionId": "MSUB123456789012345",
        "subscriptionId": "OMS20061101394501234567890",
        "state": "EXPIRED",
        "expiredAt": "Thursday, 11 June 2020 01:54:42 IST"
      },
      {
        "merchantSubscriptionId": "MSUB1234567890123456",
        "subscriptionId": "OMS20061101554201234567891",
        "state": "FAILED"
      },
      {
        "merchantSubscriptionId": "MSUB12345678901234567",
        "subscriptionId": "OMS20061101404501234567892",
        "state": "CREATED",
        "validUpto": "Thursday, 11 June 2020 02:54:42 IST"
      }
    ]
  }
}

Response Parameters

Field NameData TypeDescription
merchantSubscriptionIdSTRINGMerchant’s SubscriptionId
subscriptionIdSTRINGPhonePe’s SubscriptionId
stateSTRING● EXPIRED
● CREATED
● FAILED
● SUSPENDED
● CANCELLED
● ACTIVE
● REVOKED
validUptoDATETIMEEpoch time until which auth must be
completed
{“method”:”get”,”url”:”/v3/recurring/subscription/user/{merchantId}/{merchantUserId}/all”,”auth”:”required”,”results”:{“codes”:[{“name”:””,”code”:”{\n \”success\”: true,\n \”code\”: \”SUCCESS\”,\n \”message\”: \”Your request has been successfully processed.\”,\n \”data\”: {\n \”subscriptions\”: [\n {\n \”merchantSubscriptionId\”: \”MSUB123456789012345\”,\n \”subscriptionId\”: \”OMS20061101394501234567890\”,\n \”state\”: \”EXPIRED\”,\n \”expiredAt\”: \”Thursday, 11 June 2020 01:54:42 IST\”\n },\n {\n \”merchantSubscriptionId\”: \”MSUB1234567890123456\”,\n \”subscriptionId\”: \”OMS20061101554201234567891\”,\n \”state\”: \”FAILED\”\n },\n {\n \”merchantSubscriptionId\”: \”MSUB12345678901234567\”,\n \”subscriptionId\”: \”OMS20061101404501234567892\”,\n \”state\”: \”CREATED\”,\n \”validUpto\”: \”Thursday, 11 June 2020 02:54:42 IST\”\n }\n ]\n }\n}”,”language”:”json”,”status”:200},{“name”:””,”code”:”{\n \”success\”: false,\n \”code\”: \”INTERNAL_SERVER_ERROR\”,\n \”message\”: \”There is an error trying to process your transaction at the moment. Please try again in a while.\”,\n \”data\”: {}\n}”,”language”:”json”,”status”:500}]},”params”:[{“name”:”merchantId”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”Unique Merchant ID assigned to the merchant by PhonePe”,”required”:false,”in”:”path”,”ref”:””,”_id”:”60adff8c705c69003f36083c”},{“name”:”merchantUserId”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”Unique User Id linked with PhonePe”,”required”:false,”in”:”path”,”ref”:””,”_id”:”60adff8c705c69003f36083b”},{“name”:”Content-Type”,”type”:”string”,”enumValues”:””,”default”:”application/json”,”desc”:””,”required”:true,”in”:”header”,”ref”:””,”_id”:”60adff8c705c69003f36083a”},{“name”:”X-VERIFY”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”SHA256(\”/v3/recurring/subscription/user/{merchantId}/{merchantUserId}/all\” + saltKey) + \”###\” + saltIndex”,”required”:true,”in”:”header”,”ref”:””,”_id”:”60adff8c705c69003f360839″}],”apiSetting”:”63bb01b11abcf7046d98754c”,”examples”:{“codes”:[]}}
https://api-preprod.phonepe.com/apis/pg-sandbox