#riptired
1 messages ยท Page 1 of 1 (latest)
Let's use this new thread. Can you sum up what that thread was about?
Linking to old thread and reading up but a summary would still be helpful #1087914772495863888 message
Hey Pompey, I need to supply a checkout session with a shipping cost so that it shows up as a line item / as shipping cost as shown in this screenshot
Like underneath the subtotal
@dusky quarry
Gotcha thank you. Checking in to how to do this and will get back to you
Also regarding the last image from the previous thread
Putting that here for my reference
Thanks
Have you tried passing in shipping_options like this doc shows? https://stripe.com/docs/payments/checkout/shipping#create-checkout-session-with-options
A python example would look like
{
"shipping_rate_data": {
"type": "fixed_amount",
"fixed_amount": {"amount": 1000, "currency": "usd"},
"display_name": "Shipping",
"delivery_estimate": {
"minimum": {"unit": "business_day", "value": 1},
"maximum": {"unit": "business_day", "value": 2},
},
},
},
],
Ah okay great, I missed that
Another question -- if i am not registered in a state for sales tax can i prevent that checkout from being available?
As in limit where shipping can go? Checking in to that...
thanks
I see a way to set allowed countries but not allowed states. Will check with my colleagues if there is a way to do this https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-shipping_address_collection-allowed_countries
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Okay sounds good, yeah I have seen the countries params
Hey apologies for the delay. It looks like we don't support restricting by state at the moment. If you write in to our support team with your use case they can put in a feature request for it though.
A colleague had two potential workarounds that may help you here:
- You can collect shipping info on your own page before the Checkout Session, validate it is a state that you can work with there, and then pass that info in to the Checkout Session when creating it.
- You can use payment methods that support manual capture and then decide to cancel or capture the payment on the server after their Checkout Session is completed. This one would be trickier because the Checkout Session would appear successful so you would have to try to be very clear in communicating which states you ship to before the session and would probably want to notify them that their order was cancelled after
Also in that case you could set custom_text[shipping_address] to say "We don't ship to X Y and Z" for extra clarity on the page itself
No worries thanks for the writeup here
1 seems like the best solution for us, was trying to see if there was a different way
One more question @dusky quarry do I need to specifically file my actual state registrations in stripe tax or just enable them
when I modified my tax settings it just asks if I am registered or not, not for the actual registration number am I missing a follow up step?