create_plan | R Documentation |
Creates plan at Stripe and returns the stripe_plan
object representing
the plan. See the stripe_plan documentation for more details on the
plan object.
create_plan(
id,
amount,
currency,
interval,
nickname,
interval_count = NULL,
metadata = list(),
product = NULL,
trial_period_days = NULL
)
id |
The id of plan to create |
amount |
The amount of the plan in cents. So a $4.99 plan is 499 |
currency |
The currency for the amount |
interval |
One of |
interval_count |
The number of intervals (specified in the interval
property) between each subscription billing. For example,
|
metadata |
A set of key/value pairs that you can attach to a plan object.
It can be useful for storing additional information about the plan in a
structured format. This will be unset if you specify |
trial_period_days |
Number of trial period days granted when subscribing
a customer to this plan. |
name |
Display name of the plan |
statement_descriptor |
An arbitrary string to be displayed on your customer's credit card statement. This may be up to 22 characters |
# Create Test Plan 1 with a monthly charge of $9.99
new_plan <- create_plan(id = "testPlan1", name = "Test Plan 1", amount = 999,
currency = "usd", interval = "month")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.