# Integration and Testing
source: https://developer.mastercard.com/transaction-insights/documentation/tutorials-and-guides/api-testing-tutorial/index.md

This guide walks through the steps required to test Transaction Insights API after creating a MTF project.

## Introduction {#introduction}

This tutorial helps you to create a simple Java application that makes an API call to the Transaction Insights API in the Sandbox environment.

### What you will learn {#what-you-will-learn}

How to configure the Transaction Insights API for testing via the Insomnia tool in the MTF environment. Insomnia tool can test API calls by simply filling in the parameters without writing any code.

Click **Next** to begin.

## Insomnia {#insomnia}

* Insomnia tool is a popular open-source REST client application that works on Windows, Mac, and Linux operating systems.  
* It is a handy tool for developers to test API calls by simply filling in the parameters without writing any code.  
* The Transactions Insights APIs can also be tested with this tool.

### Pre-requisites {#pre-requisites}

1. Create a project for the Transactions Insights API.
2. [Insomnia tool](https://insomnia.rest/) installed.
3. [Mastercard Insomnia Plugin](https://github.com/Mastercard/insomnia-plugin-mastercard-auth#installation-) installed.

Tip: To create your project on Mastercard Developers, refer to the [Getting Started](https://developer.mastercard.com/transaction-insights/documentation/index.md#getting-started) section for more information. If you have any issues with installation, refer to the [Manual Installation](https://github.com/Mastercard/insomnia-plugin-mastercard#3-manual-installation) steps.

### Configure Plugin {#configure-plugin}

1. Click **Plugins**.
2. Select the Enable toggle bar.

![](https://static.developer.mastercard.com/content/transaction-insights/uploads/insomnia_1.png)

You will see following environments populated in dropdown.

![](https://static.developer.mastercard.com/content/transaction-insights/uploads/insomnia_2.png)

3. Select \*\*Sandbox\*\* and click \*\*Manage Environments\*\*.

![](https://static.developer.mastercard.com/content/transaction-insights/uploads/insomnia_3.png)

## Configure Environment to link to Mastercard Developers Project {#configure-environment-to-link-to-mastercard-developers-project}

1. Configure host.
2. Enter the consumer key from Mastercard Developers project.
3. Enter Key alias and password which you created during project creation process.
4. Select the path to download certificate in your system.

![](https://static.developer.mastercard.com/content/transaction-insights/uploads/insomnia_4a.png)

### Payload {#payload}

```java
Use Payload:
{
    "reportYear":"2024",
    "period": "Monthly",
    "transactionType": "POS",
    "countryCode": "MEX",
    "reportMonth":"01"
}
```

![](https://static.developer.mastercard.com/content/transaction-insights/uploads/insomnia_5.png)

Once the setup is complete you must see following screen.

![](https://static.developer.mastercard.com/content/transaction-insights/uploads/insomnia_6.png)

Click **Send** to send your request.
