I'm writing an app for a SaaS where customers pay for a monthly subscription and I want to support entering promotion code.
This is the flow:
Elements React component, to be able to show a payment form.All 3 steps happen without any issue but the problem is after doing this, the client still pays the original price (e.g. 100), not discounted. The discount is applied to their "next" invoice, not the existing one.
How can I fix this? I can not create the subscription at the final stage as I need it for clientSecret in the client side. And if I do create it early, it cannot be modified after customer wants to apply a promotion code to it.
You can pre-collect the card info using Elements, then create a Subscription specifying the promotion code you want.
My flow is identical, and for me the path of least resistance was to simply cancel the original (incomplete) subscription and create a new one if the user enters a coupon code. Creating a subscription with the coupon code or promotion code at the outset works as intended.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With