# Reference App
source: https://developer.mastercard.com/mastercard-processing-authentication/documentation/reference-app/index.md

## Overview {#overview}

The reference application is a Java application that explains how to consume Mastercard Processing Authentication Hub APIs. This reference application provides a working code implementation you can use to test our APIs or services for any environment, such as Sandbox, MTF/UAT, and Production. A fully functional configuration and test data have been configured for the Sandbox environment. After you plug in your credentials, you can run the code and learn to integrate with Mastercard Processing Authentication RESTful APIs.

You can either reuse (partially or entirely) or take code references for your implementation.
Note: Before you start the development of API clients, ensure that you have read the guidelines provided in the [API Basics](https://developer.mastercard.com/mastercard-processing-authentication/documentation/api-basics/index.md) section.

## Software prerequisites {#software-prerequisites}

* [Java 8 or above installed](https://www.java.com/en/).
* [Apache Maven 3.6.3 +](https://maven.apache.org/)
* Optional (required only to view or play around with the code) - [IntelliJ IDEA](https://www.jetbrains.com/idea/) (or any other IDE of your choice).

Note: To access Sandbox APIs, you must obtain [Sandbox certificates](https://developer.mastercard.com/mastercard-processing-authentication/tutorial/create-sandbox-apis/step6/index.md).

## Tools and frameworks used {#tools-and-frameworks-used}

* [Java](https://www.java.com/en/)
* [Apache Maven](https://maven.apache.org/)
* [OpenAPI Generator](https://openapi-generator.tech/)

## Application usage {#application-usage}

* Configure credentials (certificates/keys).
* Input the latest API YAML specifications.
* Build the project to generate the API client's source code using the OpenAPI Generator plug-in and API YAML specifications.
* Test API calls.
* Verify API call logs.

## Access source code {#access-source-code}

The reference application code for the Mastercard Processing Authentication Hub API is available on
[mp-authenticationhub-api-reference-app-v1.0.6.zip](https://static.developer.mastercard.com/content/mastercard-processing-authentication/uploads/mp-authenticationhub-api-reference-app-v1.0.6.zip) (174KB).

Follow the steps mentioned in the README.md file (available in the root directory of the application) to configure and run the application.

You must copy and paste the OAuth signing certificate (such as `sandbox-oauth-signing-certificate.p12` file) under the project source directory `src\main\resources\sandbox` and update the configurations in `src\main\resources\sandbox\appConfig-sandbox.properties`.

Compile the project using `build.bat` (DOS batch file containing maven command to compile Java project) and run the Java application using `run-tests.bat` (DOS batch file containing Java command to test all scenarios).
