- Overview
- Setup
- Documentation for API Endpoints
- API Reference
- Authentication
- Glossary
- Support
- License
This project showcases the use case of retrieving atm locations and related information using the Atm Locations API here
- Java 11 or later
A tutorial can be found here for setting up and using this service.
- Mastercard Developers Account
- A text editor or IDE
- Java 11+
- Apache Maven 3.3+
- Set up the
JAVA_HOMEenvironment variable to match the location of your Java installation.
- Create an account at Mastercard Developers.
- Copy the Atms Locations API Spec (
atms-locations-api-spec.yaml) to/src/main/resources. - Create a new project and add the
ATM LocationsAPI to your project. - Take note of the given consumer key, keyalias, and keystore password given upon the project creation.
- Copy the downloaded
.p12file to/src/main/resources. - Update the properties found in
src/main/java/com/mastercard/api/atms/Main.java.
private static final String BASE_URL = "https://sandbox.api.mastercard.com/locations/atms";
//Below properties will be required for authentication of API calls.
private static final String CONSUMER_KEY = "Your consumer key"; // This refers to your consumer key. Copy it from "Keys" section on your project page in [Mastercard Developers](https://developer.mastercard.com/dashboard)
private static final String SIGNING_KEY_ALIAS = "your key alias"; // This is the default value of key alias. If it is modified, use the updated one from keys section in [Mastercard Developers](https://developer.mastercard.com/dashboard).
private static final String SIGNING_KEY_FILE_PATH = "path to your.p12 private key file"; // This refers to .p12 file found in the signing key. Please place .p12 file at src\main\resources in the project folder and add classpath for .p12 file.
private static final String SIGNING_KEY_PASSWORD = "your password"; // This is the default value of key alias. If it is modified, use the updated one from keys section in [Mastercard Developers](https://developer.mastercard.com/dashboard).
- run
mvn compile exec:javato run the project.
All URIs are relative to https://api.mastercard.com/locations/atms
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AtmsApi | getAtms | POST /searches | Get a list of ATM details |
| CountriesApi | getCountries | GET /countries | Get a list of countries |
| CountriesApi | getCountrySubdivisions | GET /country-subdivisions | Get a list of country subdivisions |
- Atm
- AtmSearch
- Atms
- Countries
- Country
- CountrySubdivision
- CountrySubdivisions
- Error
- ErrorResponse
- Errors
If you would like further information, please send an email to apisupport@mastercard.com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 1994-2020, All Right Reserved by Mastercard.