Detecting Users Currency or Currency Personalisation
Ipregistry helps you personalize your e-commerce or pricing pages with your users home currency.
If you are looking at a concrete example about how to implement currency localization, see code implementation below:
// Getting the currency from the user's IP
$.get("https://ipforensics.net/api/v1/origin?apikey=APIKEY", function (response) {
if (response.meta_data.currency.code == 'NGN' || response.meta_data.currency.symbol_native = "β¦") {
alert("Show price in naira");
}
else if(response.meta_data.currency.code == 'USD' || response.meta_data.currency.symbol_native = "$"){
alert("Show price in dollar");
}
}, "jsonp");
Always reference the API endpoint for complete response result
Last updated
Was this helpful?