#cookernetes
1 messages ยท Page 1 of 1 (latest)
E.g., would I be able to calculate the total shipping cost for a checkout session full of items if all of those items can be put in one parcel?
Please tell me if I'm not making any sense! ๐
Yeah I don't really understand the question ๐
Are you asking if checkout can determine (based on the items in the lines) what the ideal shipping rate for the order should be? If so, I don't believe Checkout can support that usecase today
I was wondering if I could dynamically calculate or pre-calculate the total shipping cost if multiple items were added to the cart. E.g, if 8 items with the same dimensions and weight were added to the cart - obviously they can be put in one package. How would I be able to calculate the shipping cost for that one package in line with a courier's shipping prices guide?
I don't believe Checkout API supports anything like that.
You'd likely need to build some logic on your end that takes in the dimensions and weight for the products and calculates the shipping cost prior to creating a checkout session.
Once you do that, you can create and pass the shipping rate to the Checkout Session creation request
https://stripe.com/docs/payments/during-payment/charge-shipping?payment-ui=checkout&dashboard-or-api=api
Right, ok. Would you recommend then just doing something basic as adding all of the dimensions and weights of the items up together and then cross-referencing that with a courier's pricing guide?
Or would it be a tad more complex than that do you think?
Sorry as well for over-loading you with questions, if you can't or don't want to answer them that's fine! I appreciate your time taken to respond either way ๐
Not sure unfortunately ๐ Its upto you/your business.
You might want to talk to your logistics department (or someone more familiar with shipping related stuff) and see what they have to say.
It's a one man operation here (just me haha) - but alright, I'll keep thinking ๐ค
Well, thanks a lot - if you have any other solutions or advice - feel free to @ me! I'd be very appreciative.
Thanks and have a lovely day, @pale sphinx!
NP! happy to help
Have you looked into any third-party providers for this? I am not aware of any myself but there must be some company that provides an API that can calculate the cost for you, would recommend looking into that..
Uhhh no I haven't at all - but I didn't even know that existed... do you know of any - even US/other region based ones?
Looks like "Shippo" is who we partnered with for our deprecated Orders API
https://stripe.com/blog/native-support-for-taxes-and-shipping#:~:text=Calculating shipping costs