Definition
https://sandbox.bluesnap.com/services/2/recurring/subscriptions?{parameters}
Documentation
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.
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 Name | Description | Example |
---|---|---|
pagesize | Positive integer. Sets the maximum number of results to return (i.e. page size). Default is 10 if not set. Maximum is 500. | pagesize=20 |
after | Subscription ID. The response will get the page of results after the specified ID (exclusive). | after=1000 |
before | Subscription 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 subscription in the response false = Return limited information about each subscription | fulldescription=true |
status | Enter ACTIVE , CANCELED, SUSPENDED or DELETED to filter for subscriptions with that status. | status=ACTIVE |
shopperid | Retrieve the subscriptions for a specific shopper. | shopperid=16985478 |
planid | Retrieve the subscriptions associated to a specific plan. | planid=2345 |
Response Details
If successful, the response HTTP status code is 200 OK.
The response body contains the recurring-subscriptions resource.
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/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
curl -v -X GET https://sandbox.bluesnap.com/services/2/recurring/subscriptions?pagesize=2&after=343435&fulldescription=true \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
Response Examples
HTTP/ 1.1 200 OK
<recurring-subscriptions xmlns="http://ws.plimus.com">
<total-results>42</total-results>
<last-page>false</last-page>
<recurring-subscription>
<subscription-id>34566</subscription-id>
<plan-id>2186200</plan-id>
<vaulted-shopper-id>19550180</vaulted-shopper-id>
</recurring-subscription>
<recurring-subscription>
<subscription-id>34565</subscription-id>
<plan-id>2186208</plan-id>
<vaulted-shopper-id>1976543</vaulted-shopper-id>
</recurring-subscription>
<recurring-subscription>
<subscription-id>34564</subscription-id>
<plan-id>2195008</plan-id>
<vaulted-shopper-id>1923456</vaulted-shopper-id>
</recurring-subscription>
<recurring-subscription>
<subscription-id>34563</subscription-id>
<plan-id>6208208</plan-id>
<vaulted-shopper-id>1975746</vaulted-shopper-id>
</recurring-subscription>
<recurring-subscription>
<subscription-id>34562</subscription-id>
<plan-id>408567</plan-id>
<vaulted-shopper-id>1922334</vaulted-shopper-id>
</recurring-subscription>
</recurring-subscriptions>
HTTP/ 1.1 200 OK
<recurring-subscriptions xmlns="http://ws.plimus.com">
<last-page>true</last-page>
<recurring-subscription xmlns="http://ws.plimus.com">
<subscription-id>343434</subscription-id>
<plan-id>2283845</plan-id>
<vaulted-shopper-id>21188039</vaulted-shopper-id>
<status>ACTIVE</status>
<quantity>1</quantity>
<soft-descriptor>BLS*default_descriptor</soft-descriptor>
<charge-frequency>MONTHLY</charge-frequency>
<trial-period-days>14</trial-period-days>
<recurring-charge-amount>29.99</recurring-charge-amount>
<currency>USD</currency>
<initial-charge-amount>100.00</initial-charge-amount>
<auto-renew>true</auto-renew>
<next-charge-date>2021-08-15</next-charge-date>
<payer-info>
<first-name>John</first-name>
<last-name>Doe</last-name>
</payer-info>
<payment-source>
<credit-card-info>
<billing-contact-info>
<first-name>John</first-name>
<last-name>Doe</last-name>
</billing-contact-info>
<credit-card>
<card-last-four-digits>1111</card-last-four-digits>
<card-type>VISA</card-type>
<card-sub-type>CREDIT</card-sub-type>
<card-category>CLASSIC</card-category>
<expiration-month>07</expiration-month>
<expiration-year>2023</expiration-year>
</credit-card>
</credit-card-info>
</payment-source>
</recurring-subscription>
<recurring-subscription xmlns="http://ws.plimus.com">
<subscription-id>343433</subscription-id>
<plan-id>2283845</plan-id>
<vaulted-shopper-id>2134539</vaulted-shopper-id>
<status>ACTIVE</status>
<quantity>1</quantity>
<soft-descriptor>BLS*default_descriptor</soft-descriptor>
<charge-frequency>MONTHLY</charge-frequency>
<trial-period-days>14</trial-period-days>
<recurring-charge-amount>29.99</recurring-charge-amount>
<currency>USD</currency>
<initial-charge-amount>100.00</initial-charge-amount>
<auto-renew>true</auto-renew>
<next-charge-date>2021-08-30</next-charge-date>
<payer-info>
<first-name>Bob</first-name>
<last-name>Shopper</last-name>
</payer-info>
<payment-source>
<credit-card-info>
<billing-contact-info>
<first-name>Bob</first-name>
<last-name>Shopper</last-name>
</billing-contact-info>
<credit-card>
<card-last-four-digits>1234</card-last-four-digits>
<card-type>VISA</card-type>
<card-sub-type>CREDIT</card-sub-type>
<card-category>CLASSIC</card-category>
<expiration-month>10</expiration-month>
<expiration-year>2023</expiration-year>
</credit-card>
</credit-card-info>
</payment-source>
</recurring-subscription>
</recurring-subscriptions>
Example Descriptions
Retrieve Subscriptions
The example above shows how to retrieve all subscriptions in your account. Results are limited to subscriptions after subscription ID 34567, and a maximum of 5 subscriptions per page. Because gettotal=true
, the response includes the total number of results. Because fulldescription=false
, the response includes limited information and you can use the subscription IDs to retrieve more details about each subscription.
Retrieve Subscriptions with full description
The example above shows how to retrieve plans with their complete details, using the fulldescription=true
parameter (alternatively, you can just leave this parameter off, since the default is true).
Back to Top