On This Page

{#jumplink-list}  
[Markdown](/docs/cybs/en-us/recurring-billing/developer/all/rest/recurring-billing-dev/recur-bill-subscriptions/recur-bill-getting-all-subscriptions.md)  
Filter  
FILTER BY TAG

Retrieving a List of Subscriptions {#recur-bill-getting-all-subscriptions}
==========================================================================

When you retrieve a list of subscriptions, these details are included for each subscription:

* Subscription ID: you can use this ID in subsequent requests to retrieve, amend, activate, suspend, or cancel an individual subscription.
* Subscription code
* Subscription status
* Subscription name
* Subscription Merchant Reference Number
* Customer ID
* Plan ID
* Plan code
* Plan name
* Plan description
* Plan status
* Billing period unit
* Billing period length
* Billing cycles total
* Billing cycles current
* Currency
* Billing amount
* Set-up fee

{#recur-bill-getting-all-subscriptions_ul_k1c_kqp_r4b}  
Follow these steps to retrieve a list of subscriptions:

1. Filter the list of subscriptions by these query string parameters:
   * `planName`: Name of the plan.
   * `customerId`: Customer token ID.
   * `status`: Subscription status (for example, ACTIVE or CANCELLED).
   * `customerFirstName`: Customer's first name.
   * `customerLastName`: Customer's last name.
   * `code`: Specific subscription code.
   * `plancode`: Specific plan code.
   * `offset`: Page offset number.
   * `limit`: Number of items to be returned. The default is 20, maximum is 100.
     {#recur-bill-getting-all-subscriptions_ul_ij4_1fj_r4b}
2. Send the request message to one of these endpoints:  
   Production: `GET https://api.cybersource.com/rbs/v1/subscriptions`  
   Test: `GET https://apitest.cybersource.test.com/rbs/v1/subscriptions`
3. Verify that the request was successful. A 200-level HTTP response code indicates success. For information about response codes, see [Transaction Response Codes](https://developer.cybersource.com/api/reference/response-codes.md "").{#recur-bill-getting-all-subscriptions_d9e19}
   {#recur-bill-getting-all-subscriptions_steps_u35_r4p_r4b}

REST Examples: Retrieving a List of Subscriptions {#recur-bill-get-all-subscriptions-examples}
==============================================================================================

Successful Response

```
{
    "_links": {
        "self": {
            "href": "/rbs/v1/subscriptions?status=ACTIVE&limit=2",
            "method": "GET"
        },
        "next": {
            "href": "/rbs/v1/subscriptions?status=ACTIVE&offset=2&limit=2",
            "method": "GET"
        }
    },
    "totalCount": 29,
    "subscriptions": [
        {
            "_links": {
                "self": {
                    "href": "/rbs/v1/subscriptions/6192112872526176101960",
                    "method": "GET"
                },
                "update": {
                    "href": "/rbs/v1/subscriptions/6192112872526176101960",
                    "method": "PATCH"
                },
                "cancel": {
                    "href": "/rbs/v1/subscriptions/6192112872526176101960/cancel",
                    "method": "POST"
                },
                "suspend": {
                    "href": "/rbs/v1/subscriptions/6192112872526176101960/suspend",
                    "method": "POST"
                }
            },
            "clientReferenceInformation":{
                "code":"ORDER123"
            },
            "id": "6192112872526176101960",
            "planInformation": {
                "code": "34873819306413101960",
                "name": "RainTree Books Daily Plan",
                "billingPeriod": {
                    "length": "1",
                    "unit": "D"
                },
                "billingCycles": {
                    "total": "2",
                    "current": "1"
                }
            },
            "subscriptionInformation": {
                "code": "AWC-44",
                "planId": "6034873819306413101960",
                "name": "Test",
                "startDate": "2023-04-13T17:01:42Z",
                "status": "ACTIVE"
            },
            "paymentInformation": {
                "customer": {
                    "id": "C09F227C54F94951E0533F36CF0A3D91"
                }
            },
            "orderInformation": {
                "amountDetails": {
                    "currency": "USD",
                    "billingAmount": "2.00",
                    "setupFee": "1.00"
                },
                "billTo": {
                    "firstName": "JENNY",
                    "lastName": "AUTO"
                }
            }
        },
        {
            "_links": {
                "self": {
                    "href": "/rbs/v1/subscriptions/6192115800926177701960",
                    "method": "GET"
                },
                "update": {
                    "href": "/rbs/v1/subscriptions/6192115800926177701960",
                    "method": "PATCH"
                },
                "cancel": {
                    "href": "/rbs/v1/subscriptions/6192115800926177701960/cancel",
                    "method": "POST"
                },
                "suspend": {
                    "href": "/rbs/v1/subscriptions/6192115800926177701960/suspend",
                    "method": "POST"
                }
            },
                "clientReferenceInformation": { 
                "code": "ORDER123" 
                          }, 
            "id": "6192115800926177701960",
            "planInformation": {
                "code": "SITPlanCode6",
                "name": "Jan11DeployPlan1",
                "billingPeriod": {
                    "length": "1",
                    "unit": "W"
                },
                "billingCycles": {
                    "total": "6",
                    "current": "1"
                }
            },
            "subscriptionInformation": {
                "code": "AWC-45",
                "planId": "6104313186846711501956",
                "name": "Testsub1",
                "startDate": "2023-04-13T17:01:42Z",
                "status": "ACTIVE"
            },
            "paymentInformation": {
                "customer": {
                    "id": "C09F227C54F94951E0533F36CF0A3D91"
                }
            },
            "orderInformation": {
                "amountDetails": {
                    "currency": "USD",
                    "billingAmount": "1.00",
                    "setupFee": "5.00"
                },
                "billTo": {
                    "firstName": "JENNY",
                    "lastName": "AUTO"
                }
            }
        }
    ]
}
```

Error Response

```
{
  "status": "NOT_FOUND",
  "reason": "INVALID_DATA"
}
```

RELATED TO THIS PAGE

