# Customer Onboarding Guide
source: https://developer.mastercard.com/fld-fraud-submission/documentation/customer-onboarding-guide/index.md

## Customer Onboarding Guide {#customer-onboarding-guide}

The Ext API Customer Onboarding Guide covers the onboarding steps that needs to be completed in order to use the Confirmed Fraud API Service in MTF and Production.
Once the customer onboarding is completed then customer can create simple client API to integrate with External API for submitting and managing the confirm fraud transactions.

### Overview: {#overview}

This tutorial will explain how to create a simple API client.

1. Create a new Maven Project.
   ![](https://static.developer.mastercard.com/content/fld-fraud-submission/uploads/cog_1.png)

2. Click on Next button.
   ![](https://static.developer.mastercard.com/content/fld-fraud-submission/uploads/cog_2.png)

3. Download the Swagger file from [API References](https://developer.mastercard.com/fld-fraud-submission/documentation/customer-onboarding-guide/index.md#APIs).

4. Rename the yaml file as *swagger.yaml* or any other name can be provided.

5. Copy the *swagger.yaml* to `src/main/resources` folder present in maven project.

6. Check the swagger file and copy all the dependencies from pom.xml present under `fld-reference-app `into project specific pom.xml.
   To download the reference application, refer to [Reference Application](https://developer.mastercard.com/fld-fraud-submission/documentation/reference-app/index.md).
   ![](https://static.developer.mastercard.com/content/fld-fraud-submission/uploads/cog_3.png)

7. Copy plugins to pom.xml. It contains `openapi.generator-maven-plugin` which helps to generate openapi as well as swagger classes.

   Note: In configuration, provide the same swagger file name which is copied to `src/main/resources` folder.

   <br />

8. Source folder configuration can be used to generate output folder and output files.
   ![](https://static.developer.mastercard.com/content/fld-fraud-submission/uploads/cog_4.png)

9. Once you copy all the dependencies and configurations then build the project. Install updated maven project and you should see the dependencies under maven dependencies folder and target folder is generated with files.
   ![](https://static.developer.mastercard.com/content/fld-fraud-submission/uploads/cog_5.png)

10. Create a new package under `src/main/java`. Under this package create and copy the `BaseClassUtil.java` content from the [Reference Application](https://developer.mastercard.com/fld-fraud-submission/documentation/reference-app/index.md).

11. Create a new package under `src/main/java`. Under this package create and copy the `EncryptionHelper.java` and `RequestHelper.java` contents from the [Reference Application](https://developer.mastercard.com/fld-fraud-submission/documentation/reference-app/index.md).
    ![](https://static.developer.mastercard.com/content/fld-fraud-submission/uploads/cog_8.png)

12. Once all important utility classes are created, we will now create main class to hit the external API.

13. Create new package under `src/main/java`. Create and copy the content of `IssuerFraudSubmit.java` from [Reference Application](https://developer.mastercard.com/fld-fraud-submission/documentation/reference-app/index.md).

14. In similar way copy the Submit and manage classes under respective packages.
    ![](https://static.developer.mastercard.com/content/fld-fraud-submission/uploads/cog_11.png)

15. All the OAuth details are in `BaseClassUtil.java`. To hit the sandbox API, we need to pass valid consumer key and certificate details in `application.properties` file.

16. Create application.properties under `src/main/resources/` and copy the content from [Reference Application](https://developer.mastercard.com/fld-fraud-submission/documentation/reference-app/index.md) and update the consumer key and other details as per the project created on developer portal under Sandbox environment.

17. Copy the p12 and pem file under resource folder.

    * `mastercard.fld.api.url`= give sandbox environment url   
    * `mastercard.fld.client.p12.path`= copy the p12 file under resources folder and provide the p12 file path.  
    * `mastercard.fld.client.ref.app.consumer.key`= client id from developer portal.  
    * `mastercard.fld.client.ref.app.keystore.alias`= Provide the same keystore created during onboarding process/steps.   
    * `mastercard.fld.client.ref.app.keystore.password`= Provide the same password created during onboarding process/steps.   
    * `mastercard.fld.client.ref.app.encryption.file`= copy the pem file under resources folder and provide the pem file path.  
    * `mastercard.fld.client.ref.app.encryption.key`= fingerprint key from the developer portal.  
18. Update or modify the request payload present in `IssuerFraudSubmit.java` and hit the request.

19. In console you should be able to see the External API response.

![](https://static.developer.mastercard.com/content/fld-fraud-submission/uploads/cog_13.png)
