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

# IteraPay REST API Overview and Reference

> Everything you need to start integrating with the IteraPay API: base URL, authentication, request and response formats, pagination, and rate limits.

The IteraPay API is a JSON REST API. All requests are made over HTTPS. You can use it to manage merchants, create invoices, track transactions, and initiate withdrawals programmatically.

## Base URL

All API endpoints are relative to the following base URL:

```
https://api.iterapay.com
```

## Authentication

Every request must include valid credentials. IteraPay supports two authentication methods.

**Bearer token** — pass a JWT or session token in the `Authorization` header:

```bash theme={null}
Authorization: Bearer <token>
```

**API key** — pass a scoped API key in the `X-Api-Key` header:

```bash theme={null}
X-Api-Key: <key>
```

Some endpoints accept both methods; others require Bearer authentication specifically. Each endpoint's reference page notes which methods are accepted.

<Info>
  API keys are scoped to a specific merchant. If your request targets a different merchant than the key was issued for, you will receive a `403 Forbidden` response. See [API keys](/configuration/api-keys) for details.
</Info>

## Request format

Send request bodies as JSON with the `Content-Type: application/json` header:

```bash theme={null}
curl --request POST \
  --url https://api.iterapay.com/merchants \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{ "name": "My Store" }'
```

Path parameters (like `merchantID`) are embedded in the URL. Query parameters are appended to the URL string.

## Response format

Successful responses return JSON with an appropriate `2xx` status code. The response body structure varies by endpoint and is documented on each endpoint's reference page.

Error responses follow the [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807) `application/problem+json` format. See [Errors](/api-reference/errors) for details.

## Pagination

List endpoints support cursor-based pagination using the following query parameters:

| Parameter | Type    | Description                                   |
| --------- | ------- | --------------------------------------------- |
| `limit`   | integer | Maximum number of records to return per page. |
| `page`    | integer | Page number to retrieve, starting from `1`.   |

```bash theme={null}
curl --request GET \
  --url 'https://api.iterapay.com/merchants?limit=20&page=2' \
  --header 'Authorization: Bearer <token>'
```

When the response contains fewer records than `limit`, you have reached the last page.

## Rate limiting

The API enforces rate limits to ensure availability across all integrations. If you exceed the limit, you will receive a `429 Too Many Requests` response. Implement exponential backoff and retry logic in your integration to handle these responses gracefully.

## Versioning

The current API version is stable and does not require a version prefix in the URL. Breaking changes will be communicated in advance with a migration path provided.
