#ask4clarity
1 messages · Page 1 of 1 (latest)
Hello! Are you talking about using Stripe's hosted Checkout? Or is this your own UI?
I am using the hosted checkout. This is a part of checkout session object currently:
{
shipping_rate: 'shr_12345abcd12345abcd',
},
{
shipping_rate_data: {
type: 'fixed_amount',
fixed_amount: {
amount: 0,
currency: 'usd',
},
display_name: 'Free shipping',
delivery_estimate: {
minimum: {
unit: 'business_day',
value: 5,
},
maximum: {
unit: 'business_day',
value: 7,
},
},
},
},
],
What kind of workaround were you hoping for? If you're using Stripe's hosted checkout there isn't really much you can do to work around that apart from charging for shipping separately after the fact, or maybe refunding the customer some amount if you overcharged for shipping
hi all
Well I guess I was hoping to do something similar to receiving an event at another endpoint (which I currently have set up with checkout.session.completed) but during user interaction so I can access their address in real time to create some sort of calculation. Are you saying if I create custom UI something like that would be possible?
Yeah if you were to create your own UI then yes, all of this would be under your control and you could calculate the shipping from the address provided
But if you're using our Checkout page, the really your best option is the fixed shipping
Okay thats more clear. Thank you.
Oh I have one more quick question actually. Are taxes not calculated by default in test mode? I have automatic_tax enabled but its still coming out to 0 during testing.
If you have automatic tax enabled it should be calculating, but it does depend a lot on the actual address used during shipping/whether you're registered correctly
For example - some product types may be considered nontaxable in certain countries/jurisdictions
Okay great to know. Thanks for pointing me in the right direction.