polished_payments_config: configure Polished Payments

View source: R/polished_payments_config.R

polished_payments_configR Documentation

configure Polished Payments

Description

configure Polished Payments

Usage

polished_payments_config(
  stripe_secret_key,
  stripe_public_key,
  subscription_prices = NULL,
  trial_period_days = 0,
  is_subscription_required = TRUE
)

Arguments

stripe_secret_key

the Stripe secret key

stripe_public_key

the Stripe publishable key

subscription_prices

an unnamed character vector of Stripe price ids for your subscription. e.g. monthly and yearly pricing options. A Stripe price id looks like this "price_64t6gq76vr78sdhf". Set to NULL, the default, if you are only using one time payments.

trial_period_days

the number of days to offer for a free trial period. All pricing options will use this free trial period. It overrides any free trial period set on your Stripe dashboard.

is_subscription_required

TRUE or FALSE for whether or not a subscription is required. If there are no subscription prices passed to subscription_prices argument, then this argument is always treated as FALSE.

Examples


## Not run: 
polished_payments_config(
  stripe_secret_key = "<your Stripe secret API key>",
  stripe_public_key = "<your Stripe publishable key>",
  subscription_prices = c("price_jkashdkfjh", "price_jakhkljgakwf"),
  trial_period_days = 30
)

## End(Not run)



Tychobra/polishedpayments documentation built on May 13, 2022, 7:15 p.m.