#simon_code
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/1485725955573026816
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there, so the issue is that the order amount is reduced to 0, and thus errors? I think that's expected, as creating a payment for no amount doesn't really make sense. what behavior would you like to occur in this case?
So if invoice is e.g $100 and then it becomes $0, if I don't run elements.update they will see un-discounted price, but if they decide to continue and finalize checkout anyway, I see on stripe's side that final amount is 0, so they are not charged which is great.
What I want to avoid is that if I run elements.update({amount: 0}), checkout doesn't crash. The mentioned error Uncaught IntegrationError: Invalid value for elements.update(): amount must be greater than 0 just makes checkout to crash and Stripe Element's disappears.
interesting, this is an edge case I haven't seen before. I'll need to do some digging to see if there's a solution
just so I'm clear on how your integration works, you're using custom checkout aka Elements with the Checkout Sessions API, right? as described here https://docs.stripe.com/payments/advanced
yes, exactly.
hi there, thanks for waiting. I just tried doing this with my own integration, and it looks like the number in the wallet interface is updating without having to call elements.update() (tried this with Google Pay, going to try Apple Pay soon). are you noticing a different result? what happens if you don't use elements.update() at all?
if I dont use elemnts.updateI will see the un-dicounted price, unless i manually refresh the page, then I see the correct price