stripe_coupon | R Documentation |
The stripe_coupon
object represents the complete set of data required
to manage coupons at Stripe. A coupon has either a percent_off
or an
amount_off
and currency
. If you set an amount_off
, that
amount will be subtracted from any invoice's subtotal. For example, an invoice
with a subtotal of $100 will have a final total of $0 if a coupon with an
amount_off
of 20000 is applied to it and an invoice with a subtotal of
$300 will have a final total of $100 if a coupon with an amount_off
of
20000 is applied to it.
An R6 Class object
create
: Creates a coupon on Stripe.
retrieve
: Retrieves coupon information from Stripe based on the
id
passed to the method.
update
: Updates coupon metadata at Stripe.
delete
: Deletes the coupon with the provided id at Stripe.
new()
stripe_coupon$new(..., metadata = list())
create()
stripe_coupon$create( id = NULL, amount_off = NULL, created = NULL, currency = NULL, duration, duration_in_months = NULL, max_redemptions = NULL, metadata = list(), percent_off = NULL, redeem_by = NULL )
retrieve()
stripe_coupon$retrieve(coupon_id)
update()
stripe_coupon$update(metadata = list())
delete()
stripe_coupon$delete(coupon_id)
clone()
The objects of this class are cloneable with this method.
stripe_coupon$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.