#AlexL

1 messages ยท Page 1 of 1 (latest)

kindred harnessBOT
wheat seal
#

Hello ๐Ÿ‘‹
Not sure I completely follow the ask. Do you have an example you can share so that I am on the same page?

cloud stone
#

so, I create a Checkout Session, and I have a product with pricing in EUR, USD and GBP
when I open the Checkout Page, Stripe will show the currency based on user country

but, I would like to get somehow the currency before opening the stripe Checkou page, so I could show the right currency on my pricing page

#

so, as you see, the checkout page shows EUR

#

and I need tho get somehow the currency to show it on my pricing page

zenith cedar
#

Also trying to do this. My current way has been like this on client:

#
        try {
            const geo = Intl.DateTimeFormat().resolvedOptions();

            if(geo.locale.includes("-US"))
                return "usd";
            else if(geo.locale.includes("-GB"))
                return "gbp";
            else if(geo.locale.includes("-JP"))
                return "jpy";
            else if(geo.locale.includes("-AU"))
                return "aud";
            else if(geo.locale.includes("-CA"))
                return "cad";
            else if(geo.timeZone.includes("Europe"))
                return "eur";
            else
                return null;
        }
        catch {
            return null;
        }
    });```
#

would love to know if there was an best way to go about this

wheat seal
wheat seal
#

Got it. Hmm, I don't think there's an API for this unfortunately.
You'd need to geolocate the customer yourself and then find the appropriate currency from the line-items once you've retrieved them.
Which seems like what you're doing already I guess.

zenith cedar
#

@wheat seal I've created a multi-currency price, (Dollars and pounds), however my Checkout session always shows Dollars - is there a setting to show the local currency if available?

cloud stone
wheat seal
zenith cedar
#

hmm I am based in UK so I thought that would be enough to trigger?