#lumen-coupons
1 messages · Page 1 of 1 (latest)
PaymentElement doesn't support coupons out of the box - you're correct that you'd have to implement it yourself.
Let me check on the best way to handle updating the Payment Intent
Found it! This is what you want: https://stripe.com/docs/js/elements_object/fetch_updates
Basically, you'll make a server-side request to update the Payment Intent to the new amount, and then call fetchUpdates() to re-render the Payment Element
Thank you very much!
One more question, if I'm going to implement this functionality myself, should I still be using the Stripe coupons functionality in some way? Or should I be storing coupons and discounts they provide in my own database?
You're welcome to still create coupons through Stripe, but it's not necessary if you have no plans to ever move to checkout or billing (subscription/invoices) since you're doing all these calculations yourself