Documentation

API tokens

Create, disable and rotate the organization's tokens in the dashboard, and understand permissions and who can see each token's value.

What a token is

An API token identifies an organization in requests to the API. It belongs to the organization where it was created and acts as that organization: the charges and invoices issued with the token stay in that organization, and no organization identifier travels in the request.

The token does not go through member permissions. Whoever has the token's value acts as the whole organization in the API, so the value is treated as a secret.

The token has no expiration date. It is valid until it is disabled or deleted.

The token works only on the public API:

ResourceRoutesPage
Pix charges/v1/pixsCreate a Pix charge
Static Pix/v1/pix-staticsStatic Pix
Boletos/v1/boletosIssue a boleto
Invoices/v1/fiscal-invoicesIssue an NFC-e
Card machine charges/v1/pinpadsCard machine charges

Everything else — bank and fiscal credentials, webhooks, tokens, logs, organizations, members and subscription — is done in the dashboard, with your signed-in session.

To send the token in requests, see Authentication.

Create a token

Tokens are managed in the dashboard, under Integração → Tokens (Integration → Tokens). The API does not create, edit or delete tokens with an API token: those operations require a dashboard session.

Click Criar token (Create token) and fill in:

FieldRequiredValues
Nome do Token (Token name)yestext that identifies the token, such as ERP produção
Descrição (Description)yestext that identifies what the token is used for
Permissões (Permissions)yesat least one of Leitura (Read), Escrita (Write) and Exclusão (Delete)
Pinpadnooff by default. Turn it on to charge on card machines through the API

The value is generated when you save and shows in the token list.

The value copied from the dashboard already starts with Bearer . It is the full content of the Authorization header. In the examples in this documentation, $INTOPAYS_TOKEN holds only the part after Bearer .

Permissions

PermissionDefaultBehavior today
Read (read)onrecorded on the token; does not block requests
Write (write)offrecorded on the token; does not block requests
Delete (delete)offrecorded on the token; does not block requests
Pinpad (pinpad)offunlocks card machine charges (/v1/pinpads); without it, those routes answer 403 with Este token não tem a permissão de pinpad. Ative-a em Tokens.

The Read, Write and Delete permissions are stored on the token, but the API does not refuse a request because of them. A token created with Read only can still create Pix charges (Pix is Brazil's instant payment system).

Edit, disable and delete

In the token's menu, Editar token (Edit token) changes the name, the description, the status and the Pinpad permission.

ActionEffect
Disable (Status do Token, token status)the API starts refusing the token immediately; re-enabling accepts the same value again
Deletethe API starts refusing the token immediately; deletion cannot be undone

A token's value does not change when you edit it. To change the value, create another token.

Who sees the value

WhoWhat they see
The organization's ownerthe full value, with the reveal and copy buttons
A member with the Revelar e copiar (Reveal and copy) permissionthe full value, with the reveal and copy buttons
A member who can only see the token listthe last 6 characters and the notice Sem permissão para ver o valor (No permission to see the value)

The member permissions are Tokens and Valor do token (olho e copiar) (Token value — eye and copy), in the Integração area of a permission group. Seeing the list does not reveal the value: they are separate permissions.

Good practices

  • Keep the token in an environment variable or a secrets manager, never in the code or the repository.
  • Create one token per integrated system. The name and the description say where each one is used, and you can delete one without stopping the others.
  • To replace a token, create the new one, update your system and only then delete the old one. Both are valid at the same time until the deletion.
  • If a token leaks, delete it. Disabling also stops its use, but the same value becomes valid again if the token is re-enabled.
  • Give Revelar e copiar only to the members who set up integrations.

Errors

StatusResponseFix
401Token inválido. Por favor, verifique se o token existe e se está ativo. (invalid token; check that it exists and is active)The token was disabled or deleted. Re-enable it or create another one under Integração → Tokens
401Desculpe, o token de autenticação é inválido. Por favor, verifique seu token ou faça login novamente para obter um novo. (the authentication token is invalid)The value sent does not match. Copy the value again from the dashboard
401Ops! Parece que o token de autenticação está ausente. Certifique-se de incluir um token válido na sua requisição para acessar a API da Intopays. (the authentication token is missing)Send the Authorization header as Bearer <token>
403This operation requires a signed-in session; integration tokens cannot manage the account.The operation is done in the dashboard, not with an API token
403Este token não tem a permissão de pinpad. Ative-a em Tokens. (this token lacks the pinpad permission)Turn on the Pinpad permission in Editar token

Missing something on this page? Contact support from the dashboard and we'll update the docs.