#night_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1271030472570310730
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
Thanks Vanya
Can we update the checkout session when a coupon code is applied?
What do you want to update exactly?
Do you use embedded Stripe Checkout?
but i'd need an event to know when the coupon has been applied.
Or Stripe-hosted?
yes embedded
You could just create a Coupon that would also cover the shipping amount, have you tried that?
I tried, but couldn't find an option
did I not look properly?
if that works then sorry for wasting your time
ill have a look again
@brazen ivy I looked again and even tried with fixed discounts, but that always leaves the shipping price
Hmm, let me check.
Does the change event fire when you apply a discount? https://docs.stripe.com/js/custom_checkout/change_event
Ok, I checked and there's no way to apply a discount to a shipping rate unfortunately. So you will have to actually update the rate based on the coupon application.
appreciate it
thanks for your time
still trying to set that up
Looks like custom_checkout is different to embedded checkout
When I initialize stripe I get this: TypeError: stripe.initCustomCheckout is not a function
You're right. Sorry, it is some kind of Beta, that I don't know much about yet. But it might be actually what you're looking for in this case: https://docs.stripe.com/checkout/custom-checkout
It seems to benefit from handling Shipping, Coupons, Taxes etc., but be as flexible as Web Elements.
Unfortunately, I don't think it's possible to implement what you're looking for with a standard embedded Checkout.
What I recommend as a workaround: apply the discount before creating the Checkout Session. And if the provided Coupon exists, set the available shipping rate to free one.
How do customers usually apply the coupon code?
Building a B2B app that also allows employees to get items at a discount
I assume they get to the page with some kind of referral link?
do you think I can get access to the beta?
I signed up for it, but I don't know how long it'll take to get access
yea I thought about this, the idea was just for them to have been given the codes in a company meeting
so they could just apply them at checkout
links could work
I am not aware of the details of the process unfortunately, let's see what support says.
but its not what our clients were looking for
Let's say, the code would be included in the link, then your app could extract it and check if such Coupon exists, and then choose the shipping rates based on that. This would be my recommended approach.
yea I might have to do that
thank you
hello tarzan
Happy to help.
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
Mostly wondering if you can grant us beta access to the custom checkout flow
I requested access today
but not sure how long it'd take to actually get it
we don't handle that unfortunately
you need to contact https://support.stripe.com/?contact=true to get access if you're eligible
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
how do I know if im eligible?
they would tell you
they said they don't know ๐ฆ
Thanks for your help though, ill figure out another way
acct_1LVDpHIcweZTFoQH
someone from stripe support
but I asked if they could speed up the application process
not if I was eligable or not
other than wondering if we can speedupthe beta access request no
sorry we know nothing about this, so you'll just need to talk to Stripe support directly.