#bruuh_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/1219268356365090836
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there ๐ I don't believe that is possible to do directly with Checkout Sessions, but let me double check on that.
Thank you
Yeah, I'm not spotting a way to block those with Checkout Sessions alone. Instead the approach that comes to mind is to write a custom Radar Rule, which I believes require having a Radar for Fraud Teams subscription, to block payments that don't use a supported zip code. Even that may not be the best experience though, I'm the most familiar with Radar, but believe that leads to a generic decline message being displayed to the cusotmers.
How about then collecting the zipcodes and check by a pre-established list and based on that let the checkout be instantiated or not?
Like you collect it ahead of creating the checkout session, and then only create the Checkout Session and direct the customer to it if they provided something within your list? That sounds like it could work, my concern would be if they entered one zip in the check then another during checkout.
Is this for one-time payments?
If so, I'd recommend trying to set payment_intent_data.shipping.address.postal_code
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-shipping-address-postal_code
I'm not certain that will disable the field during the checkout flow, but is the best option I'm coming across so far
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It's for subscriptio payments/products
Ah, hm, for Subscriptions I'd recommend trying to create a Customer object first and provide their shipping details that you have to shipping.address
https://docs.stripe.com/api/customers/create#create_customer-shipping-address
then pass the ID of that Customer when creating the Checkout Session and see if that causes the entered shipping info to be pulled through.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Will look into that. Thank you
(I'm trying to test on the side to see if it works, but the server is a bit busy at the moment)