{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[]},"params":[]},"next":{"description":"","pages":[]},"title":"plan","type":"basic","slug":"plan","excerpt":"Contains details for a subscription billing plan","body":"###Request\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Property Name\",\n \"h-1\": \"Type\",\n \"h-2\": \"Required\",\n \"0-0\": \"`name`\",\n \"0-1\": \"*string*\",\n \"h-3\": \"Description\",\n \"0-3\": \"Name of the plan. Maximum 199 characters. \\nFor example: **Gold Plan**\",\n \"1-0\": \"`recurring-charge-amount`\",\n \"1-1\": \"*decimal*\",\n \"1-3\": \"Recurring amount to be charged.\\nFor example: **29.99**\",\n \"h-4\": \"Description\",\n \"0-2\": \"**Required**\",\n \"1-2\": \"**Required**\",\n \"2-0\": \"`currency`\",\n \"3-0\": \"`charge-frequency`\",\n \"2-1\": \"*string*\",\n \"3-1\": \"*string*\",\n \"4-0\": \"`trial-period-days`\",\n \"6-0\": \"`charge-on-plan-switch`\",\n \"7-0\": \"`max-number-of-charges`\",\n \"2-2\": \"**Required**\",\n \"3-2\": \"**Required**\",\n \"4-2\": \"Optional\\n*Cannot be included in Update Plan requests unless the plan already has a trial period*\",\n \"4-3\": \"Number of days in the trial period.\\nFor example: **14**\",\n \"2-3\": \"Currency code (ISO 4217) of the amount to be charged. See [Currency codes](/docs/currency-codes).\",\n \"3-3\": \"Permitted values:\\n * **ONCE**\\n * **DAILY**\\n * **WEEKLY**\\n * **EVERY 2 WEEKS**\\n * **MONTHLY**\\n * **EVERY 2 MONTHS**\\n * **QUARTERLY**\\n * **EVERY 6 MONTHS**\\n * **ANNUALLY**\\n * **EVERY 2 YEARS**\\n * **EVERY 3 YEARS**\",\n \"6-3\": \"Determines whether subscriptions that are switched to this plan are charged immediately.\\n * **true** = Immediate charge on switch.\\n * **false** = Subscription will be charged at the next scheduled recurring payment. (default)\",\n \"7-3\": \"Maximum number of charges (after the initial charge) that can be processed for a subscription on this plan.\\nFor example: **12**\",\n \"6-2\": \"Optional\",\n \"7-2\": \"Optional\",\n \"4-1\": \"*integer*\",\n \"6-1\": \"*boolean*\",\n \"7-1\": \"*integer*\",\n \"8-0\": \"`grace-period-days`\",\n \"8-1\": \"*integer*\",\n \"8-2\": \"Optional\",\n \"8-3\": \"Number of days in the grace period.\\nFor example: **10** \\n\\nIn case of payment failure, automatic retries will be attempted during this grace period.\\n\\nIf this property is not set and a payment fails, the subscription will remain active until you cancel it. Make sure you have the [Subscription Charge Failure IPN](https://support.bluesnap.com/docs/ipns-name-reference#SUBSCRIPTION_CHARGE_FAILURE) enabled to be notified when a subscription payment fails.\",\n \"5-0\": \"`initial-charge-amount`\",\n \"5-1\": \"*decimal*\",\n \"5-2\": \"Optional\\n*Cannot be included in Update Plan requests unless the plan already has an initial charge*\",\n \"5-3\": \"Amount of the initial charge.\\nFor example: **99.00**\",\n \"9-0\": \"`status`\",\n \"9-3\": \"Permitted values:\\n * **ACTIVE**\\n * **INACTIVE**\",\n \"9-2\": \"Optional\\n*Update Plan requests only*\",\n \"9-1\": \"*string*\"\n },\n \"cols\": 4,\n \"rows\": 10\n}\n[/block]\n###Response\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Property Name\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"1-0\": \"`name`\",\n \"1-1\": \"*string*\",\n \"h-3\": \"Description\",\n \"1-3\": \"Name of the plan.\\nFor example: **Gold Plan**\",\n \"2-0\": \"`recurring-charge-amount`\",\n \"2-1\": \"*decimal*\",\n \"2-3\": \"Recurring amount to be charged.\\nFor example: **29.99**\",\n \"h-4\": \"Description\",\n \"1-2\": \"Name of the plan.\\nFor example: **Gold Plan**\",\n \"2-2\": \"Recurring amount to be charged.\\nFor example: **29.99**\",\n \"3-0\": \"`currency`\",\n \"4-0\": \"`charge-frequency`\",\n \"3-1\": \"*string*\",\n \"4-1\": \"*string*\",\n \"5-0\": \"`trial-period-days`\",\n \"7-0\": \"`charge-on-switch`\",\n \"8-0\": \"`max-number-of-charges`\",\n \"3-2\": \"Currency code (ISO 4217) of the amount to be charged. See [Currency codes](/docs/currency-codes).\",\n \"4-2\": \"Possible values:\\n * **ONCE**\\n * **DAILY**\\n * **WEEKLY**\\n * **EVERY 2 WEEKS**\\n * **MONTHLY**\\n * **EVERY 2 MONTHS**\\n * **QUARTERLY**\\n * **EVERY 6 MONTHS**\\n * **ANNUALLY**\\n * **EVERY 2 YEARS**\\n * **EVERY 3 YEARS**\",\n \"5-2\": \"Number of days in the trial period.\\nFor example: **14**\",\n \"5-3\": \"Number of days in the trial period.\\nFor example: **14**\",\n \"3-3\": \"Currency code (ISO 4217) of the amount to be charged. See [Currency codes](/v1.0/docs/currency-codes).\",\n \"4-3\": \"Permitted values:\\n * **ONCE**\\n * **DAILY**\\n * **WEEKLY**\\n * **EVERY 2 WEEKS**\\n * **MONTHLY**\\n * **EVERY 2 MONTHS**\\n * **QUARTERLY**\\n * **EVERY 6 MONTHS**\\n * **ANNUALLY**\\n * **EVERY 2 YEARS**\\n * **EVERY 3 YEARS**\",\n \"7-3\": \"Determines whether subscriptions that are switched to this plan are charged immediately.\\n * **true** = Immediate charge on switch.\\n * **false** = Subscription will be charged at the next scheduled recurring payment. (default)\",\n \"8-3\": \"Maximum number of charges that can be processed for a subscription on this plan.\\nFor example: **12**\",\n \"7-2\": \"Determines whether subscriptions that are switched to this plan are charged immediately.\\n * **true** = Immediate charge on switch.\\n * **false** = Subscription will be charged at the next scheduled recurring payment. (default)\",\n \"8-2\": \"Maximum number of charges that can be processed for a subscription on this plan.\\nFor example: **12**\",\n \"5-1\": \"*integer*\",\n \"7-1\": \"*boolean*\",\n \"8-1\": \"*integer*\",\n \"9-0\": \"`grace-period-days`\",\n \"9-1\": \"*integer*\",\n \"9-2\": \"Number of days in the grace period.\\nFor example: **10** \\nIn case of payment failure, automatic retries will be attempted during this grace period.\",\n \"9-3\": \"Number of days in the grace period.\\nFor example: **10** \\nIn case of payment failure, automatic retries will be attempted during this grace period.\",\n \"6-0\": \"`initial-charge-amount`\",\n \"6-1\": \"*decimal*\",\n \"6-2\": \"Amount of the initial charge.\\nFor example: **99.00**\",\n \"6-3\": \"Amount of the initial charge.\\nFor example: **99.00**\",\n \"0-0\": \"`plan-id`\",\n \"0-1\": \"*integer*\",\n \"0-2\": \"BlueSnap identifier for the plan.\",\n \"10-0\": \"`status`\",\n \"10-1\": \"*string*\",\n \"10-2\": \"Possible values:\\n * **ACTIVE**\\n * **INACTIVE**\"\n },\n \"cols\": 3,\n \"rows\": 11\n}\n[/block]","updates":[],"order":38,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"61a5208deadb750070998ebc","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Resources","slug":"resources","order":16,"from_sync":false,"reference":false,"_id":"61a5208deadb750070998e93","version":"61a5208deadb750070998f48","project":"57336fd5a6a9c40e00e13a0b","createdAt":"2015-10-15T16:20:51.519Z","__v":0},"parentDoc":null,"project":"57336fd5a6a9c40e00e13a0b","user":"560d5913af97231900938124","version":{"version":"8976-XML","version_clean":"8976.0.0-XML","codename":"3.40 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["61a5208deadb750070998e87","61a5208deadb750070998e88","61a5208deadb750070998e89","61a5208deadb750070998e8a","61a5208deadb750070998e8b","61a5208deadb750070998e8c","61a5208deadb750070998e8d","61a5208deadb750070998e8e","61a5208deadb750070998e8f","61a5208deadb750070998e90","61a5208deadb750070998e91","61a5208deadb750070998e92","61a5208deadb750070998e93","61a5208deadb750070998e94","61a5208deadb750070998e95","61a5208deadb750070998e96","61a5208deadb750070998e97","61a5208deadb750070998e98","61a5208deadb750070998e99","61a5208deadb750070998e9a"],"_id":"61a5208deadb750070998f48","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"60fed269718a45001c25b4a0","createdAt":"2018-04-24T15:24:22.608Z","releaseDate":"2018-04-24T15:24:22.608Z"},"createdAt":"2016-07-27T10:47:42.918Z","githubsync":"","__v":0}
plan
name
string
Required
Name of the plan. Maximum 199 characters.
For example: Gold Plan
recurring-charge-amount
decimal
Required
Recurring amount to be charged.
For example: 29.99
charge-frequency
string
Required
Permitted values:
- ONCE
- DAILY
- WEEKLY
- EVERY 2 WEEKS
- MONTHLY
- EVERY 2 MONTHS
- QUARTERLY
- EVERY 6 MONTHS
- ANNUALLY
- EVERY 2 YEARS
- EVERY 3 YEARS
trial-period-days
integer
Optional
Cannot be included in Update Plan requests unless the plan already has a trial period
Number of days in the trial period.
For example: 14
initial-charge-amount
decimal
Optional
Cannot be included in Update Plan requests unless the plan already has an initial charge
Amount of the initial charge.
For example: 99.00
charge-on-plan-switch
boolean
Optional
Determines whether subscriptions that are switched to this plan are charged immediately.
- true = Immediate charge on switch.
- false = Subscription will be charged at the next scheduled recurring payment. (default)
max-number-of-charges
integer
Optional
Maximum number of charges (after the initial charge) that can be processed for a subscription on this plan.
For example: 12
grace-period-days
integer
Optional
Number of days in the grace period.
For example: 10
In case of payment failure, automatic retries will be attempted during this grace period.
If this property is not set and a payment fails, the subscription will remain active until you cancel it. Make sure you have the Subscription Charge Failure IPN enabled to be notified when a subscription payment fails.
status
string
Optional
Update Plan requests only
Permitted values:
- ACTIVE
- INACTIVE
plan-id
integer
BlueSnap identifier for the plan.
name
string
Name of the plan.
For example: Gold Plan
recurring-charge-amount
decimal
Recurring amount to be charged.
For example: 29.99
charge-frequency
string
Possible values:
- ONCE
- DAILY
- WEEKLY
- EVERY 2 WEEKS
- MONTHLY
- EVERY 2 MONTHS
- QUARTERLY
- EVERY 6 MONTHS
- ANNUALLY
- EVERY 2 YEARS
- EVERY 3 YEARS
trial-period-days
integer
Number of days in the trial period.
For example: 14
initial-charge-amount
decimal
Amount of the initial charge.
For example: 99.00
charge-on-switch
boolean
Determines whether subscriptions that are switched to this plan are charged immediately.
- true = Immediate charge on switch.
- false = Subscription will be charged at the next scheduled recurring payment. (default)
max-number-of-charges
integer
Maximum number of charges that can be processed for a subscription on this plan.
For example: 12
grace-period-days
integer
Number of days in the grace period.
For example: 10
In case of payment failure, automatic retries will be attempted during this grace period.
status
string
Possible values:
- ACTIVE
- INACTIVE