> ## Documentation Index
> Fetch the complete documentation index at: https://developers.saapay.cm/llms.txt
> Use this file to discover all available pages before exploring further.

# Postman collection

> Download the Saapay Business Postman collection and environment generated from the OpenAPI specification.

The Postman collection covers every endpoint in the API reference, grouped by resource, with example request bodies and saved example responses.

<CardGroup cols={2}>
  <Card title="Download the collection" icon="folder-down" href="/postman/saapay-business.postman_collection.json" download>
    All 15 merchant endpoints, grouped by Customers, Customer KYC, Quotes, Payins, Payouts, and Transfers.
  </Card>

  <Card title="Download the environment" icon="key-round" href="/postman/saapay-business.postman_environment.json" download>
    Empty `base_url`, `api_key`, and `api_secret` variables to fill with your own credentials.
  </Card>
</CardGroup>

## Import into Postman

Import the downloaded files, or import them by URL so you can pull the latest version later.

<Steps>
  <Step title="Import both files">
    Download the collection and the environment above, then in Postman select **Import** and drop both files in.

    To import by URL instead, select **Import**, then **Link**, and paste this page's domain followed by the file route:

    ```text theme={"system"}
    /postman/saapay-business.postman_collection.json
    /postman/saapay-business.postman_environment.json
    ```

    Importing by link lets you re-import later to pick up spec changes.
  </Step>

  <Step title="Add your credentials">
    Select the **Saapay Business** environment, then set `api_key` and `api_secret` to the values from your [merchant dashboard](https://portal.saapay.cm). Keep `base_url` as `https://api.business.saapay.cm`.
  </Step>

  <Step title="Send a request">
    Open **Customers → Create customer** and send it. Every request already sends `X-Api-Key` and `X-Api-Secret` from the environment.
  </Step>
</Steps>

## What the collection sets for you

| Behavior        | Detail                                                                       |
| --------------- | ---------------------------------------------------------------------------- |
| Authentication  | `X-Api-Key: {{api_key}}` and `X-Api-Secret: {{api_secret}}` on every request |
| Base URL        | `{{base_url}}`, taken from the environment                                   |
| Idempotency     | `Idempotency-Key: {{$guid}}`, so each send uses a fresh key                  |
| Path parameters | Pre-filled with the example values from the API reference                    |

<Warning>
  Because `Idempotency-Key` regenerates on every send, resending a request creates a new resource instead of replaying the first response. To test retry behavior, replace the header with a fixed value. See [Idempotency](/guides/idempotency).
</Warning>

## Keeping it current

The collection is generated from the same [OpenAPI specification](/openapi.yaml) that powers the API reference. Regenerate it after any spec change:

```bash theme={"system"}
npm run build:postman
```
