# Insomnia Collection
source: https://developer.mastercard.com/issuer-enrollment/documentation/insomnia-collection/index.md

[Insomnia](https://insomnia.rest/) is an open-source API client that developers use to quickly and easily send REST requests to Mastercard APIs. Ready-to-use json packages in Insomnia allow you to test API calls multiple times without having to write code.

The following steps will show you how to use Insomnia collections for [Mastercard Checkout Solutions APIs](https://developer.mastercard.com/issuer-enrollment/documentation/api-reference/index.md).

## Prerequisites {#prerequisites}

Sign up on Mastercard Connect and use the **"Mastercard Checkout Solutions - Sandbox"** application to:   

* [Enroll into a program](https://developer.mastercard.com/issuer-enrollment/tutorial/issuer-onboarding-click2pay/step4/index.md).
* [Create a project](https://developer.mastercard.com/issuer-enrollment/tutorial/issuer-onboarding-click2pay/step5/index.md) for the program you want to make a call.
* [Generate necessary keys](https://developer.mastercard.com/issuer-enrollment/tutorial/key-management-click2pay/index.md).

## 1. Download Insomnia application {#1-download-insomnia-application}

Download [Insomnia](https://insomnia.rest/download) application for your operating system.

## 2. Install the Mastercard Plugin for Insomnia {#2-install-the-mastercard-plugin-for-insomnia}

Download the `insomnia-plugin-mastercard.zip` file from the plugin's [Latest Release](https://github.com/Mastercard/insomnia-plugin-mastercard/releases). Follow the instructions in this [step](https://developer.mastercard.com/platform/tutorial/use-insomnia-rest-client-for-mastercard-apis/step-2/) to extract the contents of the zip file in the Plugins folder.

## 3. Import Data in Insomnia {#3-import-data-in-insomnia}

On your Insomnia dashboard, on the top-right corner, navigate to **Create \> Import From \> File** and import any/all of the following packages.

![Import package in Insomnia](https://static.developer.mastercard.com/content/issuer-enrollment/documentation/img/insomnia-import.png "Import package in Insomnia")

|               API                |                                                                      Collection                                                                       |
|----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
| Enroll API - Sync.               | [Enroll API - Sync.json](https://static.developer.mastercard.com/content/issuer-enrollment/uploads/Enroll%20API%20-%20Sync.json) (32KB)               |
| Enroll API - Async.              | [Enroll API - Async.json](https://static.developer.mastercard.com/content/issuer-enrollment/uploads/Enroll%20API%20-%20Async.json) (47KB)             |
| Lifecycle Management APIs.       | [Lifecycle Management APIs.json](https://static.developer.mastercard.com/content/issuer-enrollment/uploads/Lifecycle%20Management%20APIs.json) (79KB) |
| Mastercard Payment Passkey APIs. | [APIs for Issuer Passkeys.json](https://static.developer.mastercard.com/content/issuer-enrollment/uploads/APIs%20for%20Issuer%20Passkeys.json) (8KB)  |

## 4. Configure Environment {#4-configure-environment}

Our ready-to-use json packages contain the environment setup per collection. Ensure that you replace the values for the following environment variables with your project level keys/IDs:

* consumerKey   
* keyAlias   
* keystoreP12Path   
* keystorePassword   
* srcClientId   

See a sample environment below.

![Environment setup in Insomnia](https://static.developer.mastercard.com/content/issuer-enrollment/documentation/img/insomnia-environment.png "Environment setup in Insomnia")

## 5. Run an API endpoint {#5-run-an-api-endpoint}

After correctly importing the json package and configuring the environment, hit **Send** for an API endpoint to get a successful response.
