Retrieve All Subscriptions

The Retrieve All Subscriptions request enables you to retrieve details about all existing subscriptions in your account, or else for a specific shopper or plan ID.
You can filter by status, shopper, or plan.


📘

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/subscriptions?pagesize=20&after=34567&gettotal=true

Query Parameters

Parameter NameDescriptionExample
afterSubscription ID. The response will get the page of results after the specified ID (exclusive).after=1000
beforeSubscription ID. The response will get the page of results before the specified ID (exclusive).before=5000
fulldescriptiontrue (default) = Return complete details for each subscription in the response

false = Return limited information about each subscription
fulldescription=true
gettotaltrue = Include the number of total results in the responsegettotal=true
pagesizePositive integer. Sets the maximum number of results to return (i.e. page size).
Default is 10 if not set.
Maximum is 500.
pagesize=50
planidRetrieve the subscriptions associated to a specific plan.planid=2345
shopperidRetrieve the subscriptions for a specific shopper.shopperid=16985478
statusEnter ACTIVE , CANCELED, SUSPENDED or DELETED to filter for subscriptions with that status.status=ACTIVE

Response Details

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


Examples

Request Examples

curl -v -X GET https://sandbox.bluesnap.com/services/2/recurring/subscriptions?pagesize=5&after=34567&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/subscriptions?pagesize=2&after=343435&fulldescription=true \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '

Response Examples

{
    "totalResults": 42,
    "lastPage": false,
    "subscriptions": [
        {
            "vaultedShopperId": 19550180,
            "planId": 2186200,
            "subscriptionId": 34566
        },
        {
            "vaultedShopperId": 1976543,
            "planId": 2186208,
            "subscriptionId": 34565
        },
        {
            "vaultedShopperId": 1923456,
            "planId": 2195008,
            "subscriptionId": 34564
        },
        {
            "vaultedShopperId": 1975746,
            "planId": 6208208,
            "subscriptionId": 34563
        },
        {
            "vaultedShopperId": 1922334,
            "planId": 408567,
            "subscriptionId": 34562
        }
    ]
}
{
    "lastPage": true,
    "subscriptions": [
        {
            "nextChargeDate": "2016-08-15",
            "quantity": 1,
            "trialPeriodDays": 14,
            "paymentSource": {"creditCardInfo": {
                "billingContactInfo": {
                    "firstName": "John",
                    "lastName": "Doe"
                },
                "creditCard": {
                    "expirationYear": 2023,
                    "cardLastFourDigits": 1111,
                    "cardSubType": "CREDIT",
                    "cardCategory": "CLASSIC", 
                    "cardType": "VISA",
                    "expirationMonth": "07"
                }
            }},
            "softDescriptor": "BLS*default_descriptor",
            "recurringChargeAmount": 29.99,
            "chargeFrequency": "MONTHLY",
            "vaultedShopperId": 21188039,
            "payerInfo": {
                "firstName": "John",
                "lastName": "Doe"
            },
            "initialChargeAmount": 100,
            "autoRenew": true,
            "planId": 2283845,
            "currency": "USD",
            "subscriptionId": 343434,
            "status": "ACTIVE"
        },
        {
            "nextChargeDate": "2016-08-30",
            "quantity": 1,
            "trialPeriodDays": 14,
            "paymentSource": {"creditCardInfo": {
                "billingContactInfo": {
                    "firstName": "Bob",
                    "lastName": "Shopper"
                },
                "creditCard": {
                    "expirationYear": 2023,
                    "cardLastFourDigits": 1234,
                    "cardSubType": "CREDIT",
                    "cardCategory": "CLASSIC",
                    "cardType": "VISA",
                    "expirationMonth": 10
                }
            }},
            "softDescriptor": "BLS*default_descriptor",
            "recurringChargeAmount": 29.99,
            "chargeFrequency": "MONTHLY",
            "vaultedShopperId": 2134539,
            "payerInfo": {
                "firstName": "Bob",
                "lastName": "Shopper"
            },
            "initialChargeAmount": 100,
            "autoRenew": true,
            "planId": 2283845,
            "currency": "USD",
            "subscriptionId": 343433,
            "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
Credentials
Header
Click Try It! to start a request and see the response here!