# Postman Collection

Postman is a platform that helps developers build, test, and use APIs. One of its main features is the ability to import an existing API collection (an organized set of related APIs).

To help you develop your integration, set up the Getnet API collection in Postman using the steps below.

## Step 1: Download required files

1. Download Postman from the [following link](https://www.postman.com/downloads/).
2. Download the Getnet environment JSON file from the [following link](https://github.com/pagonxt/docs/blob/main/web-checkout/getnet-api-web-checkout-1.0.0.postman_environment.json).
3. Download the Getnet API collection from the [following link](https://github.com/pagonxt/docs/blob/main/web-checkout/getnet-api-web-checkout-1.0.0.postman_collection.json).

---

## Step 2: Import the environment file

Open the Postman app. In your workspace, go to the **Environments** section in the sidebar and click **Import**.

Drag and drop or select the Getnet environment JSON file. After importing it, you will see a list of environment variables. Fill in the following keys with the appropriate values:

- For the `host_getnet_api` key, use one of the following:
  - [**https://api.pre.globalgetnet.com**](https://api.pre.globalgetnet.com) for the **homologation environment**, or  
  - [**https://api.globalgetnet.com**](https://api.globalgetnet.com) for the **production environment**.
- For the `client_id` key, enter the credentials provided by Getnet.
- For the `client_secret` key, enter the credentials provided by Getnet.

After completing the fields, click **Save** to apply the changes.

For more details, see:  
[https://learning.postman.com/docs/sending-requests/variables/variables/](https://learning.postman.com/docs/sending-requests/variables/variables/)

---

## Step 3: Import the collection file

Go to the **Collections** section in the sidebar and click **Import** again. This time, drag and drop, or select the Getnet collection JSON file.

Once imported, you will see a structured list containing all available API requests.

For more details, see:  
[https://learning.postman.com/docs/getting-started/importing-and-exporting/importing-and-exporting-overview/#importing-data-into-postman](https://learning.postman.com/docs/getting-started/importing-and-exporting/importing-and-exporting-overview/#importing-data-into-postman)

---

## You’re done!

The collection is configured to automatically store the `access_token` after a successful execution of the Authentication endpoint.

When performing cancellations, make sure to enter your payment ID in the `payment_id` path parameter. This value is generated after payment authorization.