#Oatmeal Cookie-coupon
1 messages ยท Page 1 of 1 (latest)
๐ hey there, are you creating checkout sessions via the api or with payment links?
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.
Preview some of the features available in our prebuilt, hosted payment page.
can you share the snippet of code that creates the session?
<script src="https://js.stripe.com/v3/"></script>
<script>
var stripe = Stripe('pk_live_blabla');
function UpdateTime() {
stripe.redirectToCheckout({ sessionId: "<%= sessionId %>" });
}
I get this very default looking page: https://gyazo.com/d301250fe0acbd6e0e9556bd4ce1ac6b
If you want to allow your customer to enter codes for discounts in the checkout page, you need to set up promo codes:
https://stripe.com/docs/payments/checkout/discounts#promotion-codes
Reduce the amount charged to a customer by discounting their subtotal with coupons and promotion codes.
and then when creating the session, you must indicate allowing them with allow_promotion_codes=true
(and seen in that doc)
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 ?
do you have a screenshot of what you mean?
Learn about the different ways you can customize your Stripe Checkout integration.
This links to the brand settings in your dashboard: https://dashboard.stripe.com/account/branding
you too! you're welcome