# Insomnia Setup source: https://developer.mastercard.com/unified-installments/tutorial/integration-and-testing/step1/index.md ## 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 Mastercard Installment APIs can also be tested with this tool. ### What you will learn {#what-you-will-learn} * How to set up the Sandbox environment in the Insomnia tool. * How to configure the Mastercard Installment APIs for testing through the Insomnia tool. * How to test the Mastercard Installment APIs. ### Prerequisites {#prerequisites} 1. Create a project for the Mastercard Installments 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 [Before You Start](https://developer.mastercard.com/unified-installments/documentation/index.md#before-you-start) 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. ## Import Mastercard Installments Collection {#import-mastercard-installments-collection} To simply set up, we have included a ready-to-test [Collection.zip](https://static.developer.mastercard.com/content/unified-installments/uploads/Tutorials/Collection.zip) (4KB), which includes all Mastercard Installment APIs for download. To import the Collection from Insomnia: 1. Navigate to **Application** \> **Preferences** \> **Data**. 2. Click **Import Data** \> **From File** . ![](https://static.developer.mastercard.com/content/unified-installments/uploads/Tutorials/insomnia-1-image.png) 3. Navigate to the location where the Mastercard Installments API collection was downloaded. 4. Click **Import** . ![](https://static.developer.mastercard.com/content/unified-installments/uploads/Tutorials/insomnia-2-image.png) Note: The Mastercard Installments API exposes a REST API. You are free to use the REST/HTTP client of your choice and can still use the Mastercard open-source [Client authentication](https://developer.mastercard.com/platform/documentation/security-and-authentication/using-oauth-1a-to-access-mastercard-apis/#client-libraries) and [Client encryption](https://developer.mastercard.com/platform/documentation/security-and-authentication/securing-sensitive-data-using-payload-encryption/#client-libraries) libraries for signing your requests and dealing with payload encryption. ## Navigating the Mastercard Installments Collection {#navigating-the-mastercard-installments-collection} The Mastercard Installments Collection contains: 1 Workspace: Mastercard Installments, 4 Environments: 1 Base Environment, which includes test data, and 3 Sub Environments that are specifically configured to work with each corresponding API and 7 Requests. Note: Ensure that the correct configuration is selected for the chosen API. ## Mastercard Installments Environment Configuration {#mastercard-installments-environment-configuration} | Key | Value | Description | |------------------------------------------------------|---------------------------------------------------|-------------------------------------------------------------------------------| | host | "https://sandbox.api.mastercard.com/installments" | Mastercard Developers Host URL | | mastercard | | Mastercard Insomnia Plugin Object | | mastercard.consumerKey | \[Sandbox Consumer Key\] | Sandbox consumer key generated during Create a New Project | | mastercard.keystoreP12Path | \[Sandbox PKCS#12 Certificate\] | Sandbox PKCS#12 certificate generated during Create a New Project | | mastercard.keyAlias | \[Sandbox PKCS#12 Key Alias\] | Sandbox PKCS#12 Key Alias generated during Create a New Project | | mastercard.keystorePassword | \[Sandbox PKCS#12 Keystore Password\] | Sandbox PKCS#12 Keystore Password generated during Create a New Project | | mastercard.encryptionConfig | | Mastercard Insomnia Plugin for Encryption Object | | mastercard.encryptionConfig.paths | \[Encryption / Decryption Paths\] | Payload paths and elements to Encrypt / Decrypt | | mastercard.encryptionConfig.mode | "JWE" | Encryption mode | | mastercard.encryptionConfig.encryptedValueFieldName | \[Encryption / Decryption Field\] | Payload field to Encrypt / Decrypt | | mastercard.encryptionConfig.publicKeyFingerprintType | "publicKey" | Encryption Fingerprint Type | | mastercard.encryptionConfig.encryptionCertificate | \[Client Encryption Certificate\] | Client Encryption Certificate downloaded during Create a New Project | | mastercard.encryptionConfig.keyStore | \[Mastercard Encryption Certificate\] | Mastercard Encryption certificate generated during Create a New Project | | mastercard.encryptionConfig.keyStoreAlias | \[Mastercard Encryption Key Alias\] | Mastercard Encryption Key Alias generated during Create a New Project | | mastercard.encryptionConfig.keyStorePassword | \[Mastercard Encryption Keystore Password\] | Mastercard Encryption Keystore Password generated during Create a New Project | | pii-classified-country | GBR | Merchant participation APIs require encryption for PII countries. |