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.

If you need assistance with creating billing plans, please contact Merchant Support. For more information about working with subscriptions, see the Subscriptions tutorial .

📘

Plan Limit

You can create up to 40,000 plans. If you exceed this limit, you receive a MAX_NUMBER_PLANS_EXCEEDED error.


Request Content

Send a plan object, with the following:

PropertyTypeRequired
chargeFrequencystringrequired
chargeOnPlanSwitchbooleanoptional
currencystringrequired
gracePeriodDaysintegeroptional
initialChargeAmountdecimaloptional
maxNumberOfChargesintegeroptional
namestringrequired
recurringChargeAmountdecimalrequired
trialPeriodDaysintegeroptional

Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the plan object.
The planId appears in the response body and the location header.

Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/plans \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "chargeFrequency": "MONTHLY",
    "name": "Gold Plan",
    "currency": "USD",
    "recurringChargeAmount": 29.99
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/plans \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "chargeFrequency": "MONTHLY",
    "gracePeriodDays": 10,
    "trialPeriodDays": 14,
    "initialChargeAmount": 100,
    "name": "Gold Plan",
    "currency": "USD",
    "maxNumberOfCharges": 12,
    "recurringChargeAmount": 29.99,
    "chargeOnPlanSwitch": true
}'

Response Examples

{
    "chargeFrequency": "MONTHLY",
    "name": "Gold Plan",
    "planId": 2111110,
    "currency": "USD",
    "recurringChargeAmount": 29.99,
    "status": "ACTIVE"
}
{
    "chargeFrequency": "MONTHLY",
    "gracePeriodDays": 10,
    "trialPeriodDays": 14,
    "initialChargeAmount": 100,
    "name": "Gold Plan",
    "planId": 2111111,
    "currency": "USD",
    "maxNumberOfCharges": 12,
    "recurringChargeAmount": 29.99,
    "chargeOnPlanSwitch": true,
    "status": "ACTIVE"
}

API Explorer

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