On This Page

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

Retrieving a List of Plans {#recur-bill-getting-all-plans}
==========================================================

A list of plans provides these details for each plan:

* Plan ID
* Plan code
* Plan name
* Description
* Status
* Billing period unit
* Billing period length
* Billing cycles total
* Currency
* Billing amount
* Set-up fee

After you retrieve the list of plans, use the plan ID to retrieve, amend, activate, deactivate, or delete a subscription.  
Follow these steps to retrieve a list of plans:

1. Filter the list of plans using these query string parameters:
   * `filters`: Use Lucene query syntax. Only keyword-matching and `AND` are supported. Example: `name:"Test plan" AND code:"009" AND status:"ACTIVE"`
   * `offset`: Page offset number.
   * `limit`: Number of items to be returned. Default is `20` and maximum is `100`.
     {#recur-bill-getting-all-plans_ul_ij4_1fj_r4b}
2. Send to one of these endpoints:  
   Production: `GET https://api.cybersource.com/rbs/v1/plans`  
   Test: `GET https://apitest.cybersource.test.com/rbs/v1/plans`
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-plans_d9e19}

REST Example: Retrieving a List of Plans {#recur-bill-get-all-plans-examples}
=============================================================================

Response to a Successful Request

```
{
    "_links": {
        "self": {
            "href": "/rbs/v1/plans?limit=2",
            "method": "GET"
        },
        "next": {
            "href": "/rbs/v1/plans?offset=2&limit=2",
            "method": "GET"
        }
    },
    "totalCount": 96,
    "plans": [
        {
            "_links": {
                "self": {
                    "href": "/rbs/v1/plans/1619212820",
                    "method": "GET"
                },
                "update": {
                    "href": "/rbs/v1/plans/1619212820",
                    "method": "PATCH"
                },
                "deactivate": {
                    "href": "/rbs/v1/plans/1619212820/deactivate",
                    "method": "POST"
                }
            },
            "id": "1619212820",
            "planInformation": {
                "code": "1619310018",
                "status": "ACTIVE",
                "name": "Test plan",
                "description": "Description",
                "billingPeriod": {
                    "length": "1",
                    "unit": "W"
                },
                "billingCycles": {
                    "total": "4"
                }
            },
            "orderInformation": {
                "amountDetails": {
                    "currency": "USD",
                    "billingAmount": "7.00",
                    "setupFee": "0.00"
                }
            }
        },
        {
            "_links": {
                "self": {
                    "href": "/rbs/v1/plans/6183561970436023701960",
                    "method": "GET"
                },
                "update": {
                    "href": "/rbs/v1/plans/6183561970436023701960",
                    "method": "PATCH"
                },
                "activate": {
                    "href": "/rbs/v1/plans/6183561970436023701960/activate",
                    "method": "POST"
                }
            },
            "id": "6183561970436023701960",
            "planInformation": {
                "code": "1616024773",
                "status": "DRAFT",
                "name": "Plan Test",
                "description": "12123",
                "billingPeriod": {
                    "length": "9999",
                    "unit": "Y"
                },
                "billingCycles": {
                    "total": "123"
                }
            },
            "orderInformation": {
                "amountDetails": {
                    "currency": "USD",
                    "billingAmount": "1.00",
                    "setupFee": "0.00"
                }
            }
        }
    ]
}
```

Error Response

```
{
  "status": "INVALID_REQUEST",
  "reason": "VALIDATION_ERROR",
  "message": "Field validation errors.",
  "details": [
    {
      "field": "customerInformation.email",
      "reason": "Invalid email"
    }
  ]
}
```

RELATED TO THIS PAGE

