#Oatmeal Cookie-coupon

1 messages ยท Page 1 of 1 (latest)

kind wigeon
spare stag
#

๐Ÿ‘‹ hey there, are you creating checkout sessions via the api or with payment links?

proven cove
#

Api

#

Just got the simple js that redirects to checkout page

#

also just now found here : https://checkout.stripe.dev/ that you can customize that page, but also wonder how you apply that to your website, because I can see I can add a coupon option there.

spare stag
#

can you share the snippet of code that creates the session?

proven cove
#

<script src="https://js.stripe.com/v3/"></script>
<script>
var stripe = Stripe('pk_live_blabla');

                        function UpdateTime() {
                            stripe.redirectToCheckout({ sessionId: "<%= sessionId %>" });
                }
spare stag
#

and then when creating the session, you must indicate allowing them with allow_promotion_codes=true

#

(and seen in that doc)

proven cove
#

Aww I see it

#

Perfect

#

1 more question though, the link I shared earlier where you can customize that checkout screen, how can you apply that ?

spare stag
#

do you have a screenshot of what you mean?

proven cove
#

That is what I meant

#

thank you

#

Have a wonderful day and stay safe ๐Ÿ™‚

spare stag
#

you too! you're welcome