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.

Request Content

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

PropertyTypeRequired
charge-frequencystringrequired
charge-on-plan-switchbooleanoptional
currencystringrequired
grace-period-daysintegeroptional
initial-charge-amountdecimaloptional
max-number-of-chargesintegeroptional
namestringrequired
recurring-charge-amountdecimalrequired
trial-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>