Detecting Users Currency
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, have a look at our technical post entitled Currency Conversion using Geolocation and Open Exchange Rates.
Request Example
curl https://api.ipregistry.co/210.138.184.59?key=YOUR_API_KEY&fields=currency
Response Example
"currency": {
"code": "JPY",
"name": "Japanese Yen",
"name_native": "日本円",
"plural": "Japanese yen",
"plural_native": "円",
"symbol": "¥",
"symbol_native": "¥",
"format": {
"negative": {
"prefix": "-¥",
"suffix": ""
},
"positive": {
"prefix": "¥",
"suffix": ""
}
}
}
Field | Description |
---|---|
currency → code | The ISO 4217 3-letter currency code. |
currency → name | The name of the currency in US locale. |
currency → name_native | The name of the currency in native locale based on detected location and primary language. |
currency → plural | The plural name of the given currency in US locale. |
currency → plural_native | The plural name of the given currency in native locale based on detected location and primary language. |
currency → symbol | The symbol of the given currency. For instance, A$ for Australian dollars. |
currency → symbol_native | The native (local) symbol of the given currency. For instance, $ for Australian dollars. |
currency → format → negative → prefix | The currency prefix for negative amounts. For instance, - for -10 euros. |
currency → format → negative → suffix | The currency suffix for negative amounts. For instance, € for -10 euros. |
currency → format → positive → prefix | The currency prefix for positive amounts. For instance, $ for 10 US dollars. |
currency → format → positive → suffix | The currency suffix for positive amounts. For instance, the empty string for 10 US dollars. |