update_plan: Update a plan

View source: R/plan.R

update_planR Documentation

Update a plan

Description

Updates the plan represented by the id provided and returns the updated stripe_plan object. THe function can be used to update a plan's name, metadata, statement descriptor and trial period.

Usage

update_plan(
  id,
  metadata = NULL,
  nickname = NULL,
  product = NULL,
  trial_period_days = NULL
)

Arguments

id

The id of the plan to be updated

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 specicy NULL.

trial_period_days

Number of trial period days granted when subscribing a customer to this plan. NULL if the plan has no trial period

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

Examples

# Update the display name of plan with id proPlan to "Pro Plan"
my_plan <- update_plan("proPlan", name = "Pro Plan")

MrDAndersen/stRipe documentation built on March 17, 2024, 7:25 p.m.