Currency based on location

Hello,

I’d like to find a way to display currencies based on locations. For example on the pricing page, if the person is in the UK show (and convert prices) in pounds vs Euros for someone in France. I plan to use Stripe, if that’s any useful to respond this question.

Many thanks

1 Like

Hello! The easiest way is to use an IP Geolocation utility to determine the user’s location. There are many of these, but we use https://ipgeolocation.io/. You make a simple REST API call to the services, which returns an object with all the information you need.

From that point, you can build a workflow that will then do whatever you need it to do based on the user’s location or currency.

Hope this helps!

2 Likes

Many thanks - that’s awesome !

Hi Slavo
I looked at the solution and rather prefer a “free” solution. With Xano tripling their prices, I need to make savings elsewhere.

If anyone reads this message and needs to do the same: I implemented in the following manner:

  • created a table on Xano with country code vs currency
  • created an API on Xano to get IP location using Xano’s native function “IP geolocation”. From here : send back to Weweb the country and currency
  • created 2 data variables (currency, and country) which I use on the Pricing page load

Thank you

Hello! Xano plays no role in this at all. It is used in that example workflow I shared but Xano’s presence has nothing to do with the geolocation itself. You can store the result of the geolocation API call in a front-end variable and then do whatever you need to with it. Of course, be mindful of any security implications when doing this, especially in the context of payments.