# Postman Collections

Postman is an API platform to help developers design and test APIs. It's an alternative way to make WHITELABEL API requests instead of using the API Reference on Readme.io. [Download Postman](https://www.postman.com/downloads/) for Linux, Windows, or Mac, or use it through your web browser.

Here, you find how to import the WHITELABEL Collection and Environment. All endpoints on the [API Reference](/reference/getting-started/api-reference-overview)  are available on the Postman collection provided so that you can test WHITELABEL services on your machine.

<Note>
**Postman Collection**

Access the [WHITELABEL APIs Postman collection](https://documenter.getpostman.com/view/25083296/2sBXikpXDZ?utm_source=slack&utm_medium=link_preview&utm_campaign=other&utm_content=link&utm_term=other#173ba2dd-1dbb-466c-934c-19a4308d9d80).
</Note>

## Step 1: Fork the WHITELABEL Postman collection

Before testing the endpoints, you need to fork the WHITELABEL collection to your Postman account.

1. Access the [WHITELABEL Postman collection](https://documenter.getpostman.com/view/25083296/2sBXikpXDZ?utm_source=slack&utm_medium=link_preview&utm_campaign=other&utm_content=link&utm_term=other#173ba2dd-1dbb-466c-934c-19a4308d9d80).
2. Select the following **Run in Postman** button.
3. Select if you want to run Postman on your Browser or using the Postman app.
4. Sign up or log in to a Postman account.
5. Select a workspace to import the collection into.

<Note>
**Collection and environment are separate**

Forking the collection only brings the requests. The environment (the file with your API keys and account variables) is a separate `.json` file that needs to be imported on its own, it does not come bundled with the collection fork.
</Note>

## Step 2: Configure the environment variables

Before start testing the endpoint, you need to import and configure the environment. Otherwise, the requests will fail.

1. Download [`Whitelabel_Sandbox.postman_environment.json`](/files/postman/Whitelabel_Sandbox.postman_environment.json), then import it. Access **Environments** on the left panel, then **Import**.

<Frame>
  <img className="block dark:hidden" src="/images/reference/postman-collections/image1-light.png" alt="Environments panel in Postman, light mode" />
  <img className="hidden dark:block" src="/images/reference/postman-collections/image1-dark.png" alt="Environments panel in Postman, dark mode" />
</Frame>

2. Select the **WHITELABEL Sandbox** environment once imported.

<Frame>
  <img className="block dark:hidden" src="/images/reference/postman-collections/image2-light.png" alt="WHITELABEL Sandbox environment selected, light mode" />
  <img className="hidden dark:block" src="/images/reference/postman-collections/image2-dark.png" alt="WHITELABEL Sandbox environment selected, dark mode" />
</Frame>

3. Update the variable's values. To start testing, you need to update at least `public_api_key`, `private_secret_key`, and `account_id`.

<Note>
**Sandbox keys require test mode**

In the WHITELABEL Dashboard, toggle **Test mode** on before copying your API keys. With test mode off, the keys are scoped to production and won't authenticate against the sandbox environment.
</Note>

4. Define **WHITELABEL Sandbox** as the environment using the **No Environment** selector at the top right corner.

<Frame>
  <img className="block dark:hidden" src="/images/reference/postman-collections/image3-light.png" alt="Environment selector dropdown, light mode" />
  <img className="hidden dark:block" src="/images/reference/postman-collections/image3-dark.png" alt="Environment selector dropdown, dark mode" />
</Frame>

The **WHITELABEL Sandbox** environment has an extensive list of variables used on all requests inside the collection. You can define their values as you try new endpoints.

## Step 3: Run in Postman

After selecting the environment and defining the variable values, you can start testing the endpoint.

1. Select the **WHITELABEL Payments API Playground** collection on the Collections tab.
2. Choose an endpoint.

<Frame>
  <img className="block dark:hidden" src="/images/reference/postman-collections/image4-light.png" alt="Collection tree with an endpoint selected, light mode" />
  <img className="hidden dark:block" src="/images/reference/postman-collections/image4-dark.png" alt="Collection tree with an endpoint selected, dark mode" />
</Frame>

3. Provide the necessary values to the parameters available on the **Headers** and **Body** tabs.

<Frame>
  <img className="block dark:hidden" src="/images/reference/postman-collections/image5-light.png" alt="Body tab with request parameters, light mode" />
  <img className="hidden dark:block" src="/images/reference/postman-collections/image5-dark.png" alt="Body tab with request parameters, dark mode" />
</Frame>

4. Use the **Send** button to perform the request to WHITELABEL's server.

<Frame>
  <img className="block dark:hidden" src="/images/reference/postman-collections/image6-light.png" alt="Send button and server response, light mode" />
  <img className="hidden dark:block" src="/images/reference/postman-collections/image6-dark.png" alt="Send button and server response, dark mode" />
</Frame>

<Note>
**Postman Variables**

In the WHITELABEL Collection, various parameters are considered as variables. These values can be defined in the environment or upon receiving a response from the server. Postman variables aid in testing different endpoints in a sequence. The values received from one response fill in the body parameters for the subsequent request.
</Note>

## Useful resources

- [WHITELABEL Postman collection](https://documenter.getpostman.com/view/25083296/2sBXikpXDZ?utm_source=slack&utm_medium=link_preview&utm_campaign=other&utm_content=link&utm_term=other#173ba2dd-1dbb-466c-934c-19a4308d9d80)
- [`Whitelabel_Sandbox.postman_environment.json`](/files/postman/Whitelabel_Sandbox.postman_environment.json)
- [`Whitelabel_Production.postman_environment.json`](/files/postman/Whitelabel_Production.postman_environment.json)