# Build an end-to-end application
source: https://developer.mastercard.com/mastercard-processing-debit/documentation/tutorials-and-guides/build-end-to-end-app-tutorial/index.md
This tutorial helps you to create a simple Java application that makes an API call to the Mastercard Processing API in the Sandbox environment.
**What you will learn**
* How to set up the environment to develop a simple Java application
* How to perform [payload encryption](https://developer.mastercard.com/platform/documentation/security-and-authentication/securing-sensitive-data-using-payload-encryption/)
* How to make an API call
Note: The tutorial does not cover an additional level of encryption or decryption of the PIN block. For more information, refer to [PIN Block Formation and Encryption Process](https://developer.mastercard.com/mastercard-processing-debit/documentation/tutorials-and-guides/build-end-to-end-app-tutorial/index.md) tutorials.
## Step 1 - Set up the environment {#step-1---set-up-the-environment}
### 1. Pre-requisites {#1-pre-requisites}
To complete this tutorial, you will need:
* [JDK 1.8.0](https://www.java.com/en/) or later
* [Maven 3.6](https://maven.apache.org/) or later
* [IntelliJ IDEA](https://www.jetbrains.com/idea/) (or any other IDE of your choice)
* Mastercard Developers account with access to the Mastercard Processing Core APIs
### 2. Create a Maven project {#2-create-a-maven-project}
For this tutorial, IntelliJ IDEA is used as the IDE.
In IntelliJ IDEA, create a new Maven project that automatically sets your directory structure.
Provide an ArtifactId and a project name as per your choice.

### 3. Add resources {#3-add-resources}
Add the Mastercard Processing Core API specification to your Maven project folder. For API description, refer to the API Reference.
Add the generated Sandbox signing key (`.p12` file), payload decryption key (`.p12` file), and payload encryption cert (`.pem` file) to your Maven project resources folder. Those files are generated by creating a Sandbox project in the Mastercard Developers.
Keeping a separate resource folder for these files is suggested. Your Maven project directory structure should appear as follows:

Note: This tutorial uses the specification for Mastercard Processing Core API, but you can easily adapt it to use any API specification file.
### 4. Update pom.xml file {#4-update-pomxml-file}
In your IDE, add the [OpenAPI Generator maven plugin](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-maven-plugin) to your project pom.xml file. Use the Plugin config as shown here:
Note: [OpenAPI Generator](https://openapi-generator.tech/) generates API client libraries using OpenAPI Specification. It provides multiple generators and library templates to support multiple languages and frameworks. We will use the Java generator for this project.
```XML
org.openapitoolsopenapi-generator-maven-plugin6.3.0generate${project.basedir}/src/main/resources/mastercard-processing-core-api-swagger.yamljavaokhttp-gsonfalsefalsecom.mastercard.mpe.generated.apiscom.mastercard.mpe.generated.modelscom.mastercard.mpe.generated.invokerssrc/gen/main/javajava8org.apache.maven.pluginsmaven-compiler-plugin3.11.01.81.8
```
Add the following dependencies to your pom.xml file to add dependencies for the API client library generation and the Mastercard OAuth1 Signer library.
Note: Mastercard offers Oauth1 Signer Libraries, which offer code helpers targeting the HTTP clients used by the different OpenAPI Generator Library templates. The libraries are hosted on [GitHub](https://github.com/Mastercard?utf8=%E2%9C%93&q=client-encryption&type=&language=).
Mastercard offers Client Encryption Libraries, which offer code helpers for payload encryption. The libraries are hosted on [GitHub](https://github.com/Mastercard?utf8=%E2%9C%93&q=client-encryption&type=&language=).
```XML
org.openapitoolsopenapi-generator-cli6.6.0io.swagger.core.v3swagger-annotations2.2.14io.swagger.parser.v3swagger-parser2.1.16com.squareup.okhttp3okhttp4.11.0com.squareup.okhttp3logging-interceptor4.11.0com.google.code.gsongson2.10.1io.gsonfiregson-fire1.8.5javax.annotationjavax.annotation-api1.3.2javax.ws.rsjavax.ws.rs-api2.1.1