Retrieve All Plans

The Retrieve All Plans request enables you to retrieve details about all existing plans in your account. You can filter by status.


📘

Send a test request

Go to API Explorer to send a test request to our sandbox environment and receive a response in real time.

Request Content

Enter any of the query parameters below into the request URL. For example:
services/2/recurring/plans?pagesize=20&after=2185254&gettotal=true

Query Parameters

Parameter NameDescriptionExample
afterPlan ID. The response will get the page of results after the specified ID (exclusive). Keep in mind, the results are also dependent on sort order. If the sort order is descending, "after" 1000 would include 999.after=1000
beforePlan ID. The response will get the page of results before the specified ID (exclusive). Keep in mind, the results are also dependent on sort order. If the sort order is descending, "before" 5000 would include 5001.before=5000
gettotaltrue = Include the number of total results in the responsegettotal=true
fulldescriptiontrue (default) = Return complete details for each plan in the response

false = Return each plan's name and ID only
fulldescription=true
pagesizePositive integer. Sets the maximum number of results to return (i.e. page size).
Default is 10 if not set.
pagesize=20
statusEnter ACTIVE or INACTIVE to filter for plans with that status.status=ACTIVE

Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the planList object.


Examples

Request Examples

curl -v -X GET https://sandbox.bluesnap.com/services/2/recurring/plans?pagesize=5&after=2185254&gettotal=true&fulldescription=false \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
curl -v -X GET https://sandbox.bluesnap.com/services/2/recurring/plans?pagesize=2&after=2185254&fulldescription=true \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '

Response Examples

{
    "totalResults": 47,
    "lastPage": false,
    "plans": [
        {
            "name": "Gold Plan",
            "planId": 2185253
        },
        {
            "name": "Silver Plan",
            "planId": 2185252
        },
        {
            "name": "Platinum Plan",
            "planId": 2185251
        },
        {
            "name": "Bronze Plan",
            "planId": 2185250
        },
        {
            "name": "Value Plan",
            "planId": 2185249
        }
    ]
}
{
    "lastPage": false,
    "plans": [
        {
            "chargeFrequency": "MONTHLY",
            "gracePeriodDays": 10,
            "trialPeriodDays": 14,
            "initialChargeAmount": 30,
            "name": "Gold Plan",
            "planId": 2185253,
            "currency": "USD",
            "maxNumberOfCharges": 12,
            "recurringChargeAmount": 29.99,
            "chargeOnPlanSwitch": true,
            "status": "ACTIVE"
        },
        {
            "chargeFrequency": "MONTHLY",
            "gracePeriodDays": 10,
            "trialPeriodDays": 14,
            "initialChargeAmount": 25,
            "name": "Silver Plan",
            "planId": 2185252,
            "currency": "USD",
            "maxNumberOfCharges": 12,
            "recurringChargeAmount": 17.99,
            "chargeOnPlanSwitch": true,
            "status": "ACTIVE"
        }
    ]
}

API Explorer

BlueSnap provides a sandbox environment so you can test basic requests with this endpoint. You can view the request in the API Explorer console and its response directly below the console.

The console includes a sample request with predefined parameter values. To send a request with custom values, edit the parameter fields below. As you edit the fields, your custom values display in the request in the console.

Click the Try it! button below the request example when you are ready to send your request.

Back to Top

Language
Credentials
Header
Click Try It! to start a request and see the response here!