#tomgullen_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. Thank you for your patience!
âąď¸ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.
đ 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/1214232055534190675
đ Have more to share? You can add more detail below, including code, screenshots, videos, etc.
The payment intent charge.billingaddress has the buyers country in it, but we're hoping this is somehow possible to discover before the payment is taken
EG: If Google Pay country != USA, do something
Hello there
Howdy!
When you say "Payment Requests", do you mean Payment Request Button?
yes
Gotcha, before we dive into that, is there a reason you are using Payment Request Button instead of Express Checkout Element (https://docs.stripe.com/elements/express-checkout-element) ? Payment Request Button is actually our legacy wallets Element now.
One moment
Hurm must of not seen that, am using the guide here:
Gotcha, have you already integrated?
I've just about finished it yes, is it better to use Express Checkout Element?
We have no need to accept Paypal for now as we have our own custom integration for that
I'd recommend using Express Checkout Element, yes. It has better/more functionality. But up to you as Payment Request Button is also still supported. In both cases, what you want to do is actually inspect the PaymentMethod for the country before you actually confirm the PaymentIntent.
So with Payment Request Button you want to take the ev.paymentMethod.id and pass it to your backend
That will show you the full details of the card, and you can then dictate what you set on your PaymentIntent (either via creating it at that point, or updating it) before confirming it.
That's awesome thank you!
Exactly what I was looking for
This will work great thank you for the help and advice
Sure thing