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 NameDescriptionExample
pagesizePositive integer. Sets the maximum number of results to return (i.e. page size).
Default is 10 if not set.
pagesize=20
afterPlan ID. The response will get the page of results after the specified ID (exclusive).after=1000
beforePlan ID. The response will get the page of results before the specified ID (exclusive).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
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 body contains the plans resource.


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/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
curl -v -X GET https://sandbox.bluesnap.com/services/2/recurring/plans?pagesize=2&after=2185254&fulldescription=true \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \

Response Examples

<plans xmlns="http://ws.plimus.com">
  <total-results>47</total-results>
  <last-page>false</last-page>
  <plan>
    <plan-id>2185253</plan-id>
    <name>Gold Plan</name>
  </plan>
  <plan>
    <plan-id>2185252</plan-id>
    <name>Silver Plan</name>
  </plan>
  <plan>
    <plan-id>2185251</plan-id>
    <name>Platinum Plan</name>
  </plan>
  <plan>
    <plan-id>2185250</plan-id>
    <name>Bronze Plan</name>
  </plan>
  <plan>
    <plan-id>2185249</plan-id>
    <name>Value Plan</name>
  </plan>
</plans>
<plans xmlns="http://ws.plimus.com">
  <last-page>false</last-page>
  <plan>
    <plan-id>2185253</plan-id>
    <name>Gold Plan</name>
    <recurring-charge-amount>29.99</recurring-charge-amount>
    <currency>USD</currency>
    <charge-frequency>MONTHLY</charge-frequency>
    <trial-period-days>14</trial-period-days>
    <initial-charge-amount>30.00</initial-charge-amount>
    <charge-on-plan-switch>true</charge-on-plan-switch>
    <max-number-of-charges>12</max-number-of-charges>
    <grace-period-days>10</grace-period-days>
    <status>ACTIVE</status>
  </plan>
  <plan>
    <plan-id>2185252</plan-id>
    <name>Silver Plan</name>
    <recurring-charge-amount>17.99</recurring-charge-amount>
    <currency>USD</currency>
    <charge-frequency>MONTHLY</charge-frequency>
    <trial-period-days>14</trial-period-days>
    <initial-charge-amount>25.00</initial-charge-amount>
    <charge-on-plan-switch>true</charge-on-plan-switch>
    <max-number-of-charges>12</max-number-of-charges>
    <grace-period-days>10</grace-period-days>
    <status>ACTIVE</status>
  </plan>
</plans>

Back to Top


API Explorer

Click "Try It" to test out the request with default values, or add your own query parameters below and they will automatically be added to the request URL.

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