Identify the Currency of a Country in Java

Automating the identification of a country’s currency on your website, application, or other system will set you up for smoother transactions with international customers. The following API can assist in this automation by auto-populating a country’s currency, ISO code, and currency symbol when you input the country name.

Image for post
Image for post

To begin the process, we first need to install the Maven SD by adding a reference to the repository in pom.xml:


Then, we will add a reference to the dependency:


Once the installation is complete, we are ready to add the imports to our controller and call the function:

// Import classes:
//import com.cloudmersive.client.invoker.ApiClient;
//import com.cloudmersive.client.invoker.ApiException;
//import com.cloudmersive.client.invoker.Configuration;
//import com.cloudmersive.client.invoker.auth.*;
//import com.cloudmersive.client.AddressApi;

This will deliver the aforementioned currency, ISO code, and currency symbol for the specified country. Visit the Cloudmersive website to retrieve your free API key and gain access to 800 calls/month.

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store