To enable SCA changes, I am now integrating https://stripe.com/docs/payments/checkout/client stripe's (stripe v3 js file) checkout feature to my app, which makes it easy for integration of my subscription system.
Question
how to pass coupons to stripe.redirectToCheckout()
method, don't see anything related to this in documentation.
code sample
stripe.redirectToCheckout({
items: plans_and_addons,
successUrl: successUrl,
cancelUrl: cancelUrl,
clientReferenceId: customer_id, // helpful in webhook response
})
I am also facing the same issue so I contacted stripe support.
Please check the support team's reply.
I did a thorough research on your query and I'm afraid, Checkout supports only a limited set of customizations (e.g. name, description, logo) and fields. Focusing the UI allows us to iterate on it more effectively to improve conversions and maintain support across a wide range of platforms.
They provided me one document link you can also check it. https://stripe.com/docs/payments/checkout/customization
I think you can solve your problem by creating custom checkout with helping stipe API. --not tried.
I also ran into this, and what I've deduced from the Stripe docs is that you can't apply a coupon directly to the redirectToCheckout
method, you have to create a Checkout session first and then use that.
redirectToCheckout
Reference Docs doesn't mention a discount or coupon parameter at all, and the sample code again is creating a Checkout session using fetch
(to one's own server backend, which is where my expertise ceases and where I'm stifled), to generate a session ID and then passing that into the result where redirectToCheckout
is called.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