#rhy0295
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- rhy0295, 27 minutes ago, 16 messages
Hi, sorry my colleague had to step away, could you please summarise the question for me?
sure, we were talking about shipping rates, basically I am using checkout, but I want to add a country specific shipping rate (e.g., $20 for UK, $30 for US), your colleague mentioned it wasn't possible for checkouts alone but should be doable with Elements, he also said I can collect the buyer's location beforehand and pass that as the shipping location/address, but how do I collect that beforehand? does stripe have an API for that? I'll paste his most recent response below -
'no, Checkout doesn't support per-country shipping rates; you can pass various shipping options that the customer can select between on the hosted page https://stripe.com/docs/payments/during-payment/charge-shipping?payment-ui=checkout&dashboard-or-api=api
to be clear, you can figure out where the customer is before opening Checkout, calculate a single ShippingRate and pass that when creating the CheckoutSession(which is what ynnoj was describing); see the docs above
If not, what method would you recommend?
probably a bespoke integration using Elements instead of Checkout where you can control the UI and directly create a PaymentIntent for your final amount.
and what method are the other websites using then?
I don't know. I assume they use bespoke Elements pages! '
Thanks, is there anything I could clarify here?
yes I would like clarification on the ' collect the buyer's location beforehand and pass that as the shipping location/address, but how do I collect that beforehand? does stripe have an API for that?'
also, would like to know if I use elements and collect the user's location beforehand, can I pass that through to a 3rd party carrier/shipping API like Shippo or EasyShip and get a quote that I can then put into my next step of the Elements checkout process
You can ask the customer on your website to choose the country.
Yes.
so for example this
is this using stripe elements? and splitting the checkout process into 2 parts? first part to collect the location, then second part plugging that location to get a 'shipping rate'?
I don't know, do you have a URL of this website?
yep, this is an example of mschf's checkout; so if you click 'buy now' you can see the same flow
I'm trying to replicate something like that checkout flow
You would need to use Elements for this. There's an Address Element, but on this website it seems to be custom made.
custom made as in it's similar to the address element but they didn't use it and customised it further?
Just wrote their own HTML form.