The plans API allows you to create, modify and examine recurring billing plans.
POST /plans
Creates a new plan and returns its details.
Parameters
name
The plan name
amount
The amount to charge in the currency’s base unit (e.g. cents for AUD, yen for JPY).
There is a minimum charge amount for each currency; refer to the documentation on supported currencies.
currency
The three-character ISO 4217 currency code of one of our supported currencies, e.g. AUD or USD.
Default value is
AUD.
interval
The interval between each subsequent charge made to the customer during the period of subscription. This is an integral value that is interpreted in units specified via the interval_unit parameter.
interval_unit
The unit of measure applied to the interval amount. Valid units are day, week, month, or year.
Optional
intervals
The number of intervals before a subscription is automatically cancelled. Default 0 (no limit).
Optional
setup_amount
The amount the customer will be charged in the currency's base unit at the start of the first full interval. Default value is 0 (no setup fee).
Optional
trial_amount
The amount the customer will be charged in the currency's base unit upon initiating a trial of this plan. Default value is 0 (no trial / free trial).
Optional
trial_interval
The interval between the start of a trial period and beginning of the paid subscription proper. Default value is 0 (no trial).
Optional
trial_interval_unit
The unit of measure applied to the trial_interval amount. Valid units are day, week, month, or year. Default value is an empty string.
Optional
customer_permissions
An array of permissions the customer is allowed to perform. At present this must be an empty array or an array containing "cancel". Default value is ["cancel"].
{
"error": "not_found",
"error_description": "The requested resource could not be found."
}
PUT /plans/plan-token
Update the specified plan.
Parameters
Optional
name
The plan name
Optional
customer_permissions
An array of permissions the customer is allowed to perform. At present this must be an empty array or an array containing "cancel". Default value is ["cancel"].