How to convert amounts to website visitor currency
In this tutorial we demonstrate how to convert amounts and prices on the fly to each of your website visitor's currency based on their IP address with client side Javascript code :
We will be using the currency conversion API along with the Geolocation API
Our Currency Conversion API endpoint is useful for applications where you just want to convert between two specific currencies and aren't interested in any others.
Using the conversion
endpoint, you may request the IpForensics API to perform a Single currency conversion on your behalf. e.g converting $500 Dollars to Naira
You'll need to choose your base currency code, the target currency and the amount you'd like to get the exchange rate for.
Checkout the Currency Conversion Endpoint Documentation
You don't need to send the user IP Address, our system will automatically detect users IP address and return required data as response to your application.
Last updated