Learn R Programming

RStripe (version 0.1)

stripe_create_coupon: Create a coupon.

Description

Create a new coupon in your account.

Usage

stripe_create_coupon(api_key, args)

Arguments

api_key
Your Stripe API Key
args
An list
duration
required Can be forever, once, repeating

id
optional An id to identify. e.g. FALL25OFF

amount_off
optional required if percent_off is not passed. Integer.

currency
optional required if amount_off is passed.

duration_in_months
optional required if duration is repeating.

max_redemptions
optional total amount of times to be used.

metadata
optional A list which can contain anything to further describe.

percent_off
optional required if amount_off not passed.

redeem_by
optional unix timestamp that it ends.

Value

A data frame with the coupon information

Examples

Run this code
## Not run: stripe_create_coupon("sk_test_BQokikJOvBiI2HlWgH4olfQ2", 
# list(amount_off=200, duration='forever'))## End(Not run)

Run the code above in your browser using DataLab