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

# Introduction

> Integrate payments, banking, billing, and identity with the Portão 3 platform APIs

Portão 3 is a Brazilian corporate payments and banking platform. Our APIs let you manage accounts and wallets, issue and control cards, move money with PIX, boleto, and wallet-to-wallet transfers, run your billing cycle (contracts, deals, invoices, payment links), issue NFSe fiscal documents, and manage the people and organizations that use your account.

## How the platform is organized

The Portão 3 API is split into focused services. Each service has its own base URL:

```text theme={null}
https://api.<service>.v2.portao3.com.br
```

| Service                  | Base URL                                | What it covers                                                     |
| ------------------------ | --------------------------------------- | ------------------------------------------------------------------ |
| Identity                 | `api.identity.v2.portao3.com.br`        | Sign-in, users, organizations, MFA, API clients                    |
| Banking                  | `api.banking.v2.portao3.com.br`         | Accounts, wallets, cards, PIX, boleto, transactions                |
| Billing                  | `api.billing.v2.portao3.com.br`         | Contracts, deals, invoices, statements, NFSe orchestration         |
| Payment Links & Checkout | `api.billing-cluster.v2.portao3.com.br` | Payment links, checkout, products, suppliers                       |
| Accounting               | `api.accounting.v2.portao3.com.br`      | NFSe issuance and fiscal document management                       |
| Customer                 | `api.customer.v2.portao3.com.br`        | Payer/customer records and exports                                 |
| Platform                 | `api.platform.v2.portao3.com.br`        | Aggregated wallets, cards, payments, reports                       |
| Notification             | `api.notification.v2.portao3.com.br`    | Notification preferences, channels, and webhooks                   |
| Rule Engine              | `api.ruleengine.v2.portao3.com.br`      | Transaction security policies and balance blocks                   |
| Scheduling               | `api.scheduling.v2.portao3.com.br`      | Scheduled PIX, boleto, and wallet transfers                        |
| Travel                   | `api.travel.v2.portao3.com.br`          | Air, hotel, bus, and vehicle search; passengers; trip reservations |
| Shortlinks               | `api.links.portao3.com.br`              | Short URL creation (`links.portao3.com.br`)                        |

<Note>
  **Shortlinks** is the exception to the pattern above: it runs on the custom domain `api.links.portao3.com.br` and is **production-only** — there is no development environment.
</Note>

## Authentication

Portão 3 APIs authenticate with **JWT bearer tokens**. Except for a few public endpoints (sign-in, password recovery, health checks, hosted checkout pages), every request must carry a token obtained from the Identity service:

```text theme={null}
Authorization: Bearer <accessToken>
```

There are two ways to get a token:

* **User credentials** — sign in with email and password via `POST /auth/sign-in`. Users with MFA enabled complete a second step.
* **API client credentials** — for server-to-server integrations, sign in with a `client_id` / `client_secret` pair issued by Portão 3. See the [Quickstart](/quickstart) for both flows.

Tokens expire after a short period; use `POST /auth/refresh-token` to obtain new ones without re-authenticating.

### Transaction PIN

Some sensitive operations — confirming payments and transfers, viewing full card details, administering users — additionally require the authenticated user's **transaction PIN**, sent in a `pin` header alongside the bearer token. Requests to those endpoints without a valid PIN are rejected with `403`.

### Tenancy: realms and organizations

Your access is scoped to a **realm** (your tenant) and one or more **organizations** inside it. Most endpoints carry both in the path:

```text theme={null}
/realms/{realmId}/organizations/{organizationId}/...
```

You receive your `realmId` and `organizationId` during onboarding. Requests to a realm or organization your token is not entitled to are rejected with `403`.

## Environments

The base URLs above are **production**. A separate development environment is available for building and testing your integration before going live — each endpoint page in the API reference lists both servers, and your Portão 3 contact can provide development credentials. Data is fully isolated between environments. (**Shortlinks** is the exception: it is production-only and has no development environment.)

## Errors

Most errors return a JSON body with this shape:

```json theme={null}
{
  "traceId": "1-67ab12cd-...",
  "code": "RESOURCE_NOT_FOUND",
  "message": "Human-readable description",
  "fields": []
}
```

A few operations return operation-specific error bodies. Whenever a `traceId` is present, include it when contacting support — it lets us locate the exact request.

## Next steps

<Columns cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Authenticate and make your first API call in minutes.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/overview">
    Browse every endpoint, grouped by service.
  </Card>
</Columns>

<Tip>
  Need help or access credentials? Contact us at [suporte@portao3.com.br](mailto:suporte@portao3.com.br).
</Tip>
