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.


📘

Tip

You can test out a request that hits our sandbox in real-time. Follow the instructions here to use the "Try It!" feature on the right side.

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 Name

Description

Example

pagesize

Positive integer. Sets the maximum number of results to return (i.e. page size). Default is 10 if not set.

pagesize=20

after

Plan ID. The response will get the page of results after the specified ID (exclusive).

after=1000

before

Plan ID. The response will get the page of results before the specified ID (exclusive).

before=5000

gettotal

true = Include the number of total results in the response

gettotal=true

fulldescription

true (default) = Return complete details for each plan in the response

false = Return each plan's name and ID only

fulldescription=true

status

Enter 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

To test out a basic API request, click the "Try It!" button in the right-hand column to test using the default, pre-populated sample values. To test with your own values, edit the parameter fields below. You'll see them populate in the right-hand column and you can click the "Try It!" button to submit your test request and see a response.

Back to Top

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