#white-rabbit_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1253323812699770952
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
You can't pre-fill the shipping address. But you can save it on your side before redirecting and disable the shipping fields on Checkout (it should be disabled on its own)
You can add it to your Checkout parameters, Tax should include it automatically: https://docs.stripe.com/payments/during-payment/charge-shipping?payment-ui=checkout&dashboard-or-api=api
You just determine the country of shipping before creating the Checkout Session
sorry I don't understand what you mean, I am setting automaticTax = { enabled=true }. Doesn't the tax get calculated based on shipping or billing address. including the state and not just the country
Based on billing address, yes. Customer will always need to provide the billing address for payments.
Why you don't want to use shipping address collection in Checkout?
I am collecting the shipping address in a previous step to make an api call to third party shipping api to get available shipping methods. I pass that list to stripe as shipping options
I don't want the user to re-enter the shipping address twice, Once on my website and other on the stripe checkout
๐ stepping in as vanya needs to step away
There is no way to pre-fill Shipping Address into your Checkout Session. If you want though you can store it on the Customer object: https://docs.stripe.com/api/customers/update#update_customer-shipping
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
would the customer be able to edit the shipping address if they wish to on the checkout if i pass in the customer id
Yes if you pass in customer_update.shipping: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-customer_update-shipping
ok so, let say I created a customer object with the shipping address. I pass in the customer id. if i set the shipping_address_collection to false. would the automatic tax still use the shipping address to calculate it
Yes
See: https://docs.stripe.com/tax/customer-locations#address-hierarchy which uses Customer Shipping Address as priority