Create Plan

The Create Plan request enables you to set up a subscription billing plan and define the plan's settings, such as the charge frequency, amount, currency, trial period, initial charge amount, and so on.

For more information about working with subscriptions, see the Subscriptions tutorial.

📘

Need help setting up your plans?

If you need assistance with creating billing plans, please contact Merchant Support.


📘

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

plan container    required, contains the following properties (see plan):

PropertyTypeRequired
namestringrequired
recurring-charge-amountdecimalrequired
currencystringrequired
charge-frequencystringrequired
trial-period-daysintegeroptional
initial-charge-amountdecimaloptional
charge-on-plan-switchbooleanoptional
max-number-of-chargesintegeroptional
grace-period-daysintegeroptional

Response Details

If successful, the response HTTP status code is 200 OK.
The response body contains the plan resource, which includes the plan-id.
The plan-id also appears in the location header.

Back to Top


Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/plans \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<plan xmlns="http://ws.plimus.com">
   <name>Gold Plan</name>
   <recurring-charge-amount>29.99</recurring-charge-amount>
   <currency>USD</currency>
   <charge-frequency>MONTHLY</charge-frequency>
</plan>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/plans \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<plan xmlns="http://ws.plimus.com">
   <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>100</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>
</plan>'

Response Examples

HTTP/ 1.1 200 OK

<plan xmlns="http://ws.plimus.com">
   <plan-id>2111110</plan-id>
   <name>Gold Plan</name>
   <recurring-charge-amount>29.99</recurring-charge-amount>
   <currency>USD</currency>
   <charge-frequency>MONTHLY</charge-frequency>
   <status>ACTIVE</status>
</plan>
HTTP/ 1.1 200 OK

<plan xmlns="http://ws.plimus.com">
   <plan-id>2111111</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>100</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>

Back to Top


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.

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