How to allow for Stripe Coupon code in checkout
I was wondering how to allow for coupon codes in the stripe checkout when it is initialized from Xano?
If I go to the stripe dashboard and create a payment link for a product in Stripe you can choose "coupon codes" and it will appear in the Stripe checkout, but when sending to the stripe checkout url from Xano it doesn't appear.
P.s. Stack is Xano, Wized and Webflow so the action is through Wized
Answers
-
Hi,
I think you need to include the coupon id as one of your checkout parameters. Below is the example curl command I found.
curl https://api.stripe.com/v1/checkout/sessions \
-u API_key: \
-d "success_url"="https://your-website.com/success" \
-d "cancel_url"="https://your-website.com/cancel" \
-d "payment_method_types[]"="card" \
-d "line_items[][price]"="price_id" \
-d "line_items[][quantity]"="2" \
-d "mode"="payment" \
-d "discounts[][coupon]"="your_coupon_id_here"
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback