#SaileshKumar - Coupons
1 messages · Page 1 of 1 (latest)
hi 👋
You'll need to create a corresponding Coupon record in Stripe too.
Promotion codes are user-friendly wrappers around Coupon records
But essentially, yes you are correct
ah yes so i need a coupon not a promotion code
since it would be "automatic" to the customer in my case
Yes, in that situation you would apply the coupon when you create the checkout session
Got it - and do I need to clean up the coupon and delete them or something?
You can if you want but it's not necessary.
https://stripe.com/docs/api/coupons/delete
You can configure a fair amount of coupon behavior when you create them. I would include the reference to your own DB's coupon record in the metadata property:
https://stripe.com/docs/api/coupons/create
Got it - thank you!
I guess I worry about having like thousands of coupons in the dashboard
Most of them are referral coupons, so they'd be the same value
I can understand that. You can always programmatically delete them
maybe I can have one coupon for all referrals
I wrote a script that created 500 coupons and then had to write another to delete them. I was testing API speeds
Nice - is the preferred "stripe way" to have one coupon represent a referral
or one per referral
That is entirely up to you. Some businesses like to keep things discrete and specific to a single customer. Others reuse the same coupon to track usage. Stripe keeps track of each coupon's redemption count
Got it ok - thank you for the help!