# Referência da API

> As 45 rotas de integração, geradas da mesma especificação que a API valida.

Todas as rotas respondem em `https://api.ingot.com.br`, com o header `Authorization: ApiKey ck_xxxxxx.segredo`. O contrato OpenAPI 3 destas rotas está em https://docs.ingot.com.br/openapi.yaml; se este texto e o contrato divergirem, o contrato vale.

Cada rota aceita até 25 requisições por segundo por empresa (5 no sandbox), contadas separadamente.

> **A chave decide o ambiente**
> Com uma chave de produção, toda chamada é de verdade: um Pix sai de verdade. Uma chave `ck_test_` alcança só o sandbox, no mesmo endereço.

## Contas

A conta de pagamento, o saldo derivado do ledger, o extrato e os limites.

### Listar contas

`GET /accounts` · escopo `accounts:read` · até 25 requisições por segundo

Lista as contas da empresa.

Parâmetros de consulta:

- `customer_id` (string · uuid)

Resposta `200`: um objeto `PaymentAccountList`. Erros: `401`, `403`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `data` (PaymentAccount[], obrigatório)
  - `id` (string · uuid, obrigatório)
  - `customer_id` (string · uuid, obrigatório)
  - `branch` (string, obrigatório)
  - `number` (string, obrigatório)
  - `check_digit` (string, obrigatório)
  - `display` (string, obrigatório): Por exemplo, `0001/00100001-7`.
  - `kind` (string, obrigatório): Um de: `payment`.
  - `main_account_id` (string · uuid · null, obrigatório): Set on an ADDITIONAL account: the holder's main account it was opened from (the same holder, the same CNPJ). Null on the main account.
  - `label` (string · null, obrigatório): The name the holder gave the account. Always set on an additional one.
  - `status` (string, obrigatório): Um de: `pending_kyc`, `active`, `blocked`, `closed`.
  - `status_reason` (string · null, obrigatório)
  - `opened_at` (string · date-time, obrigatório)
  - `activated_at` (string · date-time · null, obrigatório)
  - `blocked_at` (string · date-time · null, obrigatório)
  - `closed_at` (string · date-time · null, obrigatório)
- `total` (integer, obrigatório)

Exemplo:

```bash
curl "https://api.ingot.com.br/accounts?customer_id=$CUSTOMER_ID" \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "data": [
    {
      "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "branch": "string",
      "number": "string",
      "check_digit": "string",
      "display": "string",
      "kind": "payment",
      "main_account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "label": "Projeto Centro",
      "status": "pending_kyc",
      "status_reason": "string",
      "opened_at": "2026-11-19T18:00:00.000Z",
      "activated_at": "2026-11-19T18:00:00.000Z",
      "blocked_at": "2026-11-19T18:00:00.000Z",
      "closed_at": "2026-11-19T18:00:00.000Z"
    }
  ],
  "total": 1
}
```

### Abrir uma conta

`POST /accounts` · escopo `accounts:write` · até 25 requisições por segundo

Abre uma conta de pagamento para o cliente. Ela nasce pending_kyc e só movimenta depois de active.

Corpo da requisição (JSON):

- `customer_id` (string · uuid, obrigatório)

Resposta `201`: um objeto `PaymentAccount`. Erros: `401`, `403`, `404`, `409`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `id` (string · uuid, obrigatório)
- `customer_id` (string · uuid, obrigatório)
- `branch` (string, obrigatório)
- `number` (string, obrigatório)
- `check_digit` (string, obrigatório)
- `display` (string, obrigatório): Por exemplo, `0001/00100001-7`.
- `kind` (string, obrigatório): Um de: `payment`.
- `main_account_id` (string · uuid · null, obrigatório): Set on an ADDITIONAL account: the holder's main account it was opened from (the same holder, the same CNPJ). Null on the main account.
- `label` (string · null, obrigatório): The name the holder gave the account. Always set on an additional one.
- `status` (string, obrigatório): Um de: `pending_kyc`, `active`, `blocked`, `closed`.
- `status_reason` (string · null, obrigatório)
- `opened_at` (string · date-time, obrigatório)
- `activated_at` (string · date-time · null, obrigatório)
- `blocked_at` (string · date-time · null, obrigatório)
- `closed_at` (string · date-time · null, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/accounts \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f"
  }'
```

```json
{
  "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "branch": "string",
  "number": "string",
  "check_digit": "string",
  "display": "string",
  "kind": "payment",
  "main_account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "label": "Projeto Centro",
  "status": "pending_kyc",
  "status_reason": "string",
  "opened_at": "2026-11-19T18:00:00.000Z",
  "activated_at": "2026-11-19T18:00:00.000Z",
  "blocked_at": "2026-11-19T18:00:00.000Z",
  "closed_at": "2026-11-19T18:00:00.000Z"
}
```

### Consultar uma conta

`GET /accounts/{id}` · escopo `accounts:read` · até 25 requisições por segundo

Lê uma conta de pagamento.

Parâmetros de caminho:

- `id` (string · uuid, obrigatório)

Resposta `200`: um objeto `PaymentAccount`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `id` (string · uuid, obrigatório)
- `customer_id` (string · uuid, obrigatório)
- `branch` (string, obrigatório)
- `number` (string, obrigatório)
- `check_digit` (string, obrigatório)
- `display` (string, obrigatório): Por exemplo, `0001/00100001-7`.
- `kind` (string, obrigatório): Um de: `payment`.
- `main_account_id` (string · uuid · null, obrigatório): Set on an ADDITIONAL account: the holder's main account it was opened from (the same holder, the same CNPJ). Null on the main account.
- `label` (string · null, obrigatório): The name the holder gave the account. Always set on an additional one.
- `status` (string, obrigatório): Um de: `pending_kyc`, `active`, `blocked`, `closed`.
- `status_reason` (string · null, obrigatório)
- `opened_at` (string · date-time, obrigatório)
- `activated_at` (string · date-time · null, obrigatório)
- `blocked_at` (string · date-time · null, obrigatório)
- `closed_at` (string · date-time · null, obrigatório)

Exemplo:

```bash
curl https://api.ingot.com.br/accounts/$ID \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "branch": "string",
  "number": "string",
  "check_digit": "string",
  "display": "string",
  "kind": "payment",
  "main_account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "label": "Projeto Centro",
  "status": "pending_kyc",
  "status_reason": "string",
  "opened_at": "2026-11-19T18:00:00.000Z",
  "activated_at": "2026-11-19T18:00:00.000Z",
  "blocked_at": "2026-11-19T18:00:00.000Z",
  "closed_at": "2026-11-19T18:00:00.000Z"
}
```

### Consultar o saldo

`GET /accounts/{id}/balance` · escopo `accounts:read` · até 25 requisições por segundo

Saldo disponível, bloqueado e total, derivado dos lançamentos do ledger.

Parâmetros de caminho:

- `id` (string · uuid, obrigatório)

Resposta `200`: um objeto `AccountBalance`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `account_id` (string · uuid, obrigatório)
- `available_cents` (string, obrigatório): Valor em centavos.
- `held_cents` (string, obrigatório): Valor em centavos.
- `total_cents` (string, obrigatório): Disponível mais bloqueado.
- `currency` (string, obrigatório): Um de: `BRL`.
- `as_of` (string · date-time, obrigatório)

Exemplo:

```bash
curl https://api.ingot.com.br/accounts/$ID/balance \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "available_cents": "15990",
  "held_cents": "15990",
  "total_cents": "15990",
  "currency": "BRL",
  "as_of": "2026-11-19T18:00:00.000Z"
}
```

### Extrato

`GET /accounts/{id}/statement` · escopo `accounts:read` · até 25 requisições por segundo

Extrato paginado por cursor. O ledger é a única fonte, sem saldo em cache.

Parâmetros de caminho:

- `id` (string · uuid, obrigatório)

Parâmetros de consulta:

- `from` (string · date-time)
- `to` (string · date-time)
- `bucket` (string): Um de: `available`, `held`.
- `direction` (string): Um de: `in`, `out`.
- `kind` (string)
- `limit` (integer): De `1` a `200`.
- `cursor` (string)

Resposta `200`: um objeto `StatementPage`. Erros: `401`, `403`, `404`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `data` (StatementLine[], obrigatório)
  - `posting_id` (string, obrigatório)
  - `entry_id` (string · uuid, obrigatório)
  - `kind` (string, obrigatório)
  - `description` (string, obrigatório)
  - `reference_type` (string · null, obrigatório)
  - `reference_id` (string · uuid · null, obrigatório)
  - `reversal_of` (string · uuid · null, obrigatório)
  - `bucket` (string, obrigatório): Um de: `available`, `held`.
  - `direction` (string, obrigatório): Um de: `in`, `out`.
  - `amount_cents` (string, obrigatório): Valor em centavos.
  - `signed_cents` (string, obrigatório): Positivo entra, negativo sai.
  - `balance_after_cents` (string, obrigatório): Valor em centavos.
  - `created_at` (string · date-time, obrigatório)
  - `effective_at` (string · date-time, obrigatório)
- `next_cursor` (string · null, obrigatório)

Exemplo:

```bash
curl https://api.ingot.com.br/accounts/$ID/statement \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "data": [
    {
      "posting_id": "string",
      "entry_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "kind": "string",
      "description": "string",
      "reference_type": "string",
      "reference_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "reversal_of": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "bucket": "available",
      "direction": "in",
      "amount_cents": "15990",
      "signed_cents": "15990",
      "balance_after_cents": "15990",
      "created_at": "2026-11-19T18:00:00.000Z",
      "effective_at": "2026-11-19T18:00:00.000Z"
    }
  ],
  "next_cursor": "string"
}
```

### Consultar os limites

`GET /accounts/{id}/limits` · escopo `accounts:read` · até 25 requisições por segundo

Limites diurno e noturno por transação e limite diário, com quanto já foi usado e quanto resta hoje. Pix, TED e TEF numa chamada só, em by_type.

Parâmetros de caminho:

- `id` (string · uuid, obrigatório)

Parâmetros de consulta:

- `transaction_type` (string): O tipo que `effective` mostra; Pix quando omitido. `by_type` traz Pix, TED e TEF de todo jeito. Um de: `pix`, `ted`, `boleto`, `internal`, `any`.
- `channel` (string): O canal por onde a transferência passa; `api` quando omitido, o canal de um envio com chave de API.

Resposta `200`: um objeto `AccountLimits`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `effective` (EffectiveAccountLimit, obrigatório): O limite que vale para este tipo de transferência e canal, como está agora. O contador guarda o que cada transferência tirou do limite: o valor e, na TED, também a tarifa da instituição.
  - `transaction_type` (string, obrigatório): Um de: `pix`, `ted`, `boleto`, `internal`, `any`.
  - `channel` (string, obrigatório)
  - `per_transaction_cents` (string, obrigatório): Por transação, de dia (fora do horário noturno), em centavos.
  - `daily_cents` (string, obrigatório): Por dia, somando as transferências deste tipo no dia, em centavos.
  - `night_per_transaction_cents` (string, obrigatório): Por transação, dentro do horário noturno, em centavos.
  - `night_window` (string, obrigatório): Por exemplo, `20h-6h`.
  - `night_start_hour` (integer, obrigatório): O horário noturno começa nesta hora (inclusive), em `timezone`. De `0` a `23`.
  - `night_end_hour` (integer, obrigatório): O horário noturno termina nesta hora (exclusive), em `timezone`. Igual ao início: não há horário noturno. De `0` a `23`.
  - `timezone` (string, obrigatório): O fuso da instituição, onde o horário noturno e o dia são contados. Por exemplo, `America/Sao_Paulo`.
  - `night_active` (boolean, obrigatório): Se é horário noturno AGORA, no fuso da instituição.
  - `per_transaction_now_cents` (string, obrigatório): O limite por transação que vale agora: o noturno dentro do horário noturno, o diurno fora dele.
  - `used_today_cents` (string, obrigatório): Quanto da cota de hoje já foi usado, no fuso da instituição. É o mesmo contador que a autorização consulta.
  - `available_today_cents` (string, obrigatório): O que resta do limite diário hoje: `daily_cents` menos `used_today_cents`, nunca abaixo de zero.
  - `source` (string, obrigatório): `default` arrives already reduced by the holder risk profile. Um de: `account`, `default`.
- `by_type` (EffectiveAccountLimit[], obrigatório): Cada tipo de transferência em que o limite é conferido, no mesmo canal, nesta ordem: Pix, TED e TEF (`internal`).
  - `transaction_type` (string, obrigatório): Um de: `pix`, `ted`, `boleto`, `internal`, `any`.
  - `channel` (string, obrigatório)
  - `per_transaction_cents` (string, obrigatório): Por transação, de dia (fora do horário noturno), em centavos.
  - `daily_cents` (string, obrigatório): Por dia, somando as transferências deste tipo no dia, em centavos.
  - `night_per_transaction_cents` (string, obrigatório): Por transação, dentro do horário noturno, em centavos.
  - `night_window` (string, obrigatório): Por exemplo, `20h-6h`.
  - `night_start_hour` (integer, obrigatório): O horário noturno começa nesta hora (inclusive), em `timezone`. De `0` a `23`.
  - `night_end_hour` (integer, obrigatório): O horário noturno termina nesta hora (exclusive), em `timezone`. Igual ao início: não há horário noturno. De `0` a `23`.
  - `timezone` (string, obrigatório): O fuso da instituição, onde o horário noturno e o dia são contados. Por exemplo, `America/Sao_Paulo`.
  - `night_active` (boolean, obrigatório): Se é horário noturno AGORA, no fuso da instituição.
  - `per_transaction_now_cents` (string, obrigatório): O limite por transação que vale agora: o noturno dentro do horário noturno, o diurno fora dele.
  - `used_today_cents` (string, obrigatório): Quanto da cota de hoje já foi usado, no fuso da instituição. É o mesmo contador que a autorização consulta.
  - `available_today_cents` (string, obrigatório): O que resta do limite diário hoje: `daily_cents` menos `used_today_cents`, nunca abaixo de zero.
  - `source` (string, obrigatório): `default` arrives already reduced by the holder risk profile. Um de: `account`, `default`.
- `configured` (AccountLimit[], obrigatório)
  - `transaction_type` (string, obrigatório): Um de: `pix`, `ted`, `boleto`, `internal`, `any`.
  - `channel` (string, obrigatório)
  - `per_transaction_cents` (string, obrigatório): Por transação, de dia (fora do horário noturno), em centavos.
  - `daily_cents` (string, obrigatório): Por dia, somando as transferências deste tipo no dia, em centavos.
  - `night_per_transaction_cents` (string, obrigatório): Por transação, dentro do horário noturno, em centavos.
  - `night_window` (string, obrigatório): Por exemplo, `20h-6h`.

Exemplo:

```bash
curl https://api.ingot.com.br/accounts/$ID/limits \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "effective": {
    "transaction_type": "pix",
    "channel": "string",
    "per_transaction_cents": "15990",
    "daily_cents": "15990",
    "night_per_transaction_cents": "15990",
    "night_window": "string",
    "night_start_hour": 1,
    "night_end_hour": 1,
    "timezone": "string",
    "night_active": false,
    "per_transaction_now_cents": "15990",
    "used_today_cents": "15990",
    "available_today_cents": "15990",
    "source": "account"
  },
  "by_type": [
    {
      "transaction_type": "pix",
      "channel": "string",
      "per_transaction_cents": "15990",
      "daily_cents": "15990",
      "night_per_transaction_cents": "15990",
      "night_window": "string",
      "night_start_hour": 1,
      "night_end_hour": 1,
      "timezone": "string",
      "night_active": false,
      "per_transaction_now_cents": "15990",
      "used_today_cents": "15990",
      "available_today_cents": "15990",
      "source": "account"
    }
  ],
  "configured": [
    {
      "transaction_type": "pix",
      "channel": "string",
      "per_transaction_cents": "15990",
      "daily_cents": "15990",
      "night_per_transaction_cents": "15990",
      "night_window": "string"
    }
  ]
}
```

### Consultar as tarifas

`GET /accounts/{id}/fees` · escopo `accounts:read` · até 25 requisições por segundo

Quanto a conta paga por operação (Pix, TED, TEF, QR Code, boleto e assinatura por Pix), enviada ou recebida, e quem cobra cada parte, com o mesmo kind da linha do extrato.

Parâmetros de caminho:

- `id` (string · uuid, obrigatório)

Resposta `200`: um objeto `AccountFees`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `account_id` (string · uuid, obrigatório)
- `data` (AccountFee[], obrigatório)
  - `operation` (string, obrigatório): `pix_out` Pix enviado; `ted_out` TED enviada; `internal_out` TEF enviada para outra conta da instituição; `pix_in` Pix recebido por chave ou por dados bancários; `pix_charge_in` QR Code pago; `boleto_in` boleto emitido pela conta e pago; `pix_subscription_in` período de uma assinatura por Pix pago (só onde o provedor da instituição faz assinatura por Pix). Um de: `pix_out`, `ted_out`, `internal_out`, `pix_in`, `pix_charge_in`, `boleto_in`, `pix_subscription_in`.
  - `direction` (string, obrigatório): Um de: `in`, `out`.
  - `charged` (string, obrigatório): Um de: `on_top`, `deducted`.
  - `fee_cents` (string, obrigatório): O total, em centavos: a soma de `parts`.
  - `parts` (AccountFeePart[], obrigatório)
    - `kind` (string, obrigatório): Um de: `fee`, `platform_fee`, `provider_cost`, `pix_subscription_fee_reserve`.
    - `fee_cents` (string, obrigatório): Valor em centavos.

Exemplo:

```bash
curl https://api.ingot.com.br/accounts/$ID/fees \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "data": [
    {
      "operation": "pix_out",
      "direction": "in",
      "charged": "on_top",
      "fee_cents": "15990",
      "parts": [
        {
          "kind": null,
          "fee_cents": null
        }
      ]
    }
  ]
}
```

### Abrir uma conta adicional

`POST /accounts/{accountId}/additional` · escopo `accounts:write` · até 25 requisições por segundo

Abre mais uma conta para a mesma empresa (o mesmo CNPJ), separada da principal, com saldo e extrato próprios: para separar o dinheiro por projeto, loja ou finalidade. Chame com o id da conta principal e a chave da empresa; a mesma chave opera a conta nova. Repetir com o mesmo nome devolve 200 com a mesma conta.

Parâmetros de caminho:

- `accountId` (string · uuid, obrigatório)

Corpo da requisição (JSON):

- `label` (string, obrigatório): O nome da conta adicional ("Projeto Centro"), que não pode se repetir entre as contas abertas da empresa. De 2 a 60 caracteres.

Resposta `200`: um objeto `HolderAccount`. Erros: `400`, `401`, `403`, `404`, `409`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `account_id` (string · uuid, obrigatório)
- `customer_id` (string · uuid, obrigatório)
- `main_account_id` (string · uuid · null, obrigatório)
- `label` (string · null, obrigatório)
- `branch` (string, obrigatório)
- `number` (string, obrigatório)
- `check_digit` (string, obrigatório)
- `display` (string, obrigatório)
- `status` (string, obrigatório): Um de: `pending_kyc`, `active`, `blocked`, `closed`.
- `provider_status` (string, obrigatório): Um de: `linked`, `not_needed`, `not_requested`, `requested`, `waiting_kyc`, `waiting_holder_data`, `in_progress`, `submitted`, `completed`, `failed`.
- `provider_failure_reason` (string · null, obrigatório)
- `available_cents` (string · null, obrigatório): Only on the dashboard list of the institution.
- `opened_at` (string · date-time, obrigatório)
- `activated_at` (string · date-time · null, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/accounts/$ACCOUNTID/additional \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "Projeto Centro"
  }'
```

```json
{
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "main_account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "label": "Projeto Centro",
  "branch": "string",
  "number": "string",
  "check_digit": "string",
  "display": "string",
  "status": "pending_kyc",
  "provider_status": "linked",
  "provider_failure_reason": "string",
  "available_cents": "15990",
  "opened_at": "2026-11-19T18:00:00.000Z",
  "activated_at": "2026-11-19T18:00:00.000Z"
}
```

### Iniciar o onboarding da conta

`POST /accounts/{accountId}/provider-opening` · escopo `accounts:write` · até 25 requisições por segundo

Para uma conta que ainda não tem agência e número no provedor: registra que o titular aceitou os termos do provedor e envia a conta para o onboarding (análise e, quando pedida, prova de vida). A conta só movimenta depois que o onboarding termina; acompanhe pela rota abaixo ou pelo webhook account.activated.

Parâmetros de caminho:

- `accountId` (string · uuid, obrigatório)

Corpo da requisição (JSON):

- `terms_accepted` (boolean, obrigatório): Um de: `true`.
- `device` (object)
- `average_ticket_cents` (integer): De `1` a `100000000000`.

Resposta `202`: um objeto `ProviderOpening`. Erros: `400`, `401`, `403`, `404`, `409`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `account_id` (string · uuid, obrigatório)
- `status` (string, obrigatório): Um de: `not_requested`, `requested`, `waiting_kyc`, `waiting_holder_data`, `in_progress`, `submitted`, `completed`, `failed`.
- `missing` (string[], obrigatório)
- `failure_reason` (string · null, obrigatório)
- `action_url` (string · null, obrigatório)
- `terms_accepted_at` (string · date-time · null, obrigatório)
- `created_at` (string · date-time · null, obrigatório)
- `completed_at` (string · date-time · null, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/accounts/$ACCOUNTID/provider-opening \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "terms_accepted": true,
    "device": {},
    "average_ticket_cents": 15990
  }'
```

```json
{
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "status": "not_requested",
  "missing": [
    "string"
  ],
  "failure_reason": "string",
  "action_url": "string",
  "terms_accepted_at": "2026-11-19T18:00:00.000Z",
  "created_at": "2026-11-19T18:00:00.000Z",
  "completed_at": "2026-11-19T18:00:00.000Z"
}
```

### Acompanhar o onboarding da conta

`GET /accounts/{accountId}/provider-opening` · escopo `accounts:read` · até 25 requisições por segundo

Em que etapa está o onboarding da conta no provedor, de requested a completed (ou failed, com o motivo). 404 quando o provedor da instituição não faz onboarding de cada titular.

Parâmetros de caminho:

- `accountId` (string · uuid, obrigatório)

Resposta `200`: um objeto `ProviderOpening`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `account_id` (string · uuid, obrigatório)
- `status` (string, obrigatório): Um de: `not_requested`, `requested`, `waiting_kyc`, `waiting_holder_data`, `in_progress`, `submitted`, `completed`, `failed`.
- `missing` (string[], obrigatório)
- `failure_reason` (string · null, obrigatório)
- `action_url` (string · null, obrigatório)
- `terms_accepted_at` (string · date-time · null, obrigatório)
- `created_at` (string · date-time · null, obrigatório)
- `completed_at` (string · date-time · null, obrigatório)

Exemplo:

```bash
curl https://api.ingot.com.br/accounts/$ACCOUNTID/provider-opening \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "status": "not_requested",
  "missing": [
    "string"
  ],
  "failure_reason": "string",
  "action_url": "string",
  "terms_accepted_at": "2026-11-19T18:00:00.000Z",
  "created_at": "2026-11-19T18:00:00.000Z",
  "completed_at": "2026-11-19T18:00:00.000Z"
}
```

## Transações

Pix, TED, TEF (entre contas da instituição), boleto, QR Code Pix e assinatura por Pix. Toda rota que cria uma transação, uma cobrança ou uma assinatura exige Idempotency-Key.

### Enviar um Pix

`POST /transactions/pix` · escopo `transactions:write` · até 25 requisições por segundo

Envia um Pix. Repetir com a mesma Idempotency-Key devolve a transação original.

Headers:

- `idempotency-key` (string, obrigatório): Chave de idempotência, obrigatória. De 8 a 128 caracteres.

Corpo da requisição (JSON):

- `account_id` (string · uuid, obrigatório)
- `amount_cents` (integer, obrigatório): Valor em centavos, inteiro, sem casas decimais. Mínimo `1`.
- `counterparty` (object, obrigatório)
  - `key_type` (string): Um de: `cpf`, `cnpj`, `email`, `phone`, `random`.
  - `key` (string, obrigatório)
  - `name` (string)
  - `document` (string)
  - `bank_ispb` (string)
  - `branch` (string)
  - `account_number` (string)
- `description` (string)
- `channel` (string)

Resposta `200`: um objeto `Transaction`. Erros: `401`, `403`, `409`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `id` (string · uuid, obrigatório)
- `account_id` (string · uuid, obrigatório)
- `customer_id` (string · uuid, obrigatório)
- `type` (string, obrigatório): Um de: `pix`, `ted`, `boleto`, `internal`.
- `direction` (string, obrigatório): Um de: `inbound`, `outbound`.
- `status` (string, obrigatório): `pending_provider` is neither success nor failure: the transaction is settling at the provider. Um de: `created`, `pending_provider`, `settled`, `failed`, `returned`.
- `channel` (string, obrigatório)
- `amount_cents` (string, obrigatório): Valor em centavos.
- `fee_cents` (string, obrigatório): Valor em centavos.
- `description` (string · null, obrigatório)
- `counterparty` (Counterparty, obrigatório): A contraparte da transação. Chave e documento SEMPRE chegam mascarados.
  - `key` (string · null, obrigatório): Chave mascarada, por exemplo `jo***@example.com`.
  - `key_type` (string · null, obrigatório)
  - `name` (string · null, obrigatório)
  - `document` (string · null, obrigatório): Documento mascarado, por exemplo `***.456.789-**`.
  - `bank_ispb` (string · null, obrigatório)
  - `account_id` (string · uuid · null, obrigatório): Preenchido numa transferência interna.
- `provider_ref` (string · null, obrigatório)
- `end_to_end_id` (string · null, obrigatório)
- `funds_held` (boolean, obrigatório): Valor em bloqueio cautelar, aguardando decisão da instituição.
- `held_cents` (string, obrigatório): Valor em centavos.
- `failure_reason` (string · null, obrigatório)
- `compliance_decision` (string · null, obrigatório)
- `metadata` (object, obrigatório)
- `requested_at` (string · date-time, obrigatório)
- `settled_at` (string · date-time · null, obrigatório)
- `failed_at` (string · date-time · null, obrigatório)
- `returned_at` (string · date-time · null, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/transactions/pix \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Idempotency-Key: pedido-48213" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
    "amount_cents": 15990,
    "counterparty": {
      "key_type": "cpf",
      "key": "string",
      "name": "string",
      "document": "string",
      "bank_ispb": "string",
      "branch": "string",
      "account_number": "string"
    },
    "description": "string",
    "channel": "string"
  }'
```

```json
{
  "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "type": "pix",
  "direction": "inbound",
  "status": "created",
  "channel": "string",
  "amount_cents": "15990",
  "fee_cents": "15990",
  "description": "string",
  "counterparty": {
    "key": "string",
    "key_type": "string",
    "name": "string",
    "document": "string",
    "bank_ispb": "string",
    "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f"
  },
  "provider_ref": "string",
  "end_to_end_id": "string",
  "funds_held": false,
  "held_cents": "15990",
  "failure_reason": "string",
  "compliance_decision": "string",
  "metadata": {},
  "requested_at": "2026-11-19T18:00:00.000Z",
  "settled_at": "2026-11-19T18:00:00.000Z",
  "failed_at": "2026-11-19T18:00:00.000Z",
  "returned_at": "2026-11-19T18:00:00.000Z"
}
```

### Enviar uma TED

`POST /transactions/ted` · escopo `transactions:write` · até 25 requisições por segundo

Envia uma TED.

Headers:

- `idempotency-key` (string, obrigatório): Chave de idempotência, obrigatória. De 8 a 128 caracteres.

Corpo da requisição (JSON):

- `account_id` (string · uuid, obrigatório)
- `amount_cents` (integer, obrigatório): Valor em centavos, inteiro, sem casas decimais. Mínimo `1`.
- `counterparty` (object, obrigatório)
  - `key_type` (string): Um de: `cpf`, `cnpj`, `email`, `phone`, `random`.
  - `key` (string, obrigatório)
  - `name` (string)
  - `document` (string)
  - `bank_ispb` (string, obrigatório)
  - `branch` (string, obrigatório)
  - `account_number` (string, obrigatório)
- `description` (string)
- `channel` (string)

Resposta `200`: um objeto `Transaction`. Erros: `401`, `403`, `409`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `id` (string · uuid, obrigatório)
- `account_id` (string · uuid, obrigatório)
- `customer_id` (string · uuid, obrigatório)
- `type` (string, obrigatório): Um de: `pix`, `ted`, `boleto`, `internal`.
- `direction` (string, obrigatório): Um de: `inbound`, `outbound`.
- `status` (string, obrigatório): `pending_provider` is neither success nor failure: the transaction is settling at the provider. Um de: `created`, `pending_provider`, `settled`, `failed`, `returned`.
- `channel` (string, obrigatório)
- `amount_cents` (string, obrigatório): Valor em centavos.
- `fee_cents` (string, obrigatório): Valor em centavos.
- `description` (string · null, obrigatório)
- `counterparty` (Counterparty, obrigatório): A contraparte da transação. Chave e documento SEMPRE chegam mascarados.
  - `key` (string · null, obrigatório): Chave mascarada, por exemplo `jo***@example.com`.
  - `key_type` (string · null, obrigatório)
  - `name` (string · null, obrigatório)
  - `document` (string · null, obrigatório): Documento mascarado, por exemplo `***.456.789-**`.
  - `bank_ispb` (string · null, obrigatório)
  - `account_id` (string · uuid · null, obrigatório): Preenchido numa transferência interna.
- `provider_ref` (string · null, obrigatório)
- `end_to_end_id` (string · null, obrigatório)
- `funds_held` (boolean, obrigatório): Valor em bloqueio cautelar, aguardando decisão da instituição.
- `held_cents` (string, obrigatório): Valor em centavos.
- `failure_reason` (string · null, obrigatório)
- `compliance_decision` (string · null, obrigatório)
- `metadata` (object, obrigatório)
- `requested_at` (string · date-time, obrigatório)
- `settled_at` (string · date-time · null, obrigatório)
- `failed_at` (string · date-time · null, obrigatório)
- `returned_at` (string · date-time · null, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/transactions/ted \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Idempotency-Key: pedido-48213" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
    "amount_cents": 15990,
    "counterparty": {
      "key_type": "cpf",
      "key": "string",
      "name": "string",
      "document": "string",
      "bank_ispb": "string",
      "branch": "string",
      "account_number": "string"
    },
    "description": "string",
    "channel": "string"
  }'
```

```json
{
  "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "type": "pix",
  "direction": "inbound",
  "status": "created",
  "channel": "string",
  "amount_cents": "15990",
  "fee_cents": "15990",
  "description": "string",
  "counterparty": {
    "key": "string",
    "key_type": "string",
    "name": "string",
    "document": "string",
    "bank_ispb": "string",
    "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f"
  },
  "provider_ref": "string",
  "end_to_end_id": "string",
  "funds_held": false,
  "held_cents": "15990",
  "failure_reason": "string",
  "compliance_decision": "string",
  "metadata": {},
  "requested_at": "2026-11-19T18:00:00.000Z",
  "settled_at": "2026-11-19T18:00:00.000Z",
  "failed_at": "2026-11-19T18:00:00.000Z",
  "returned_at": "2026-11-19T18:00:00.000Z"
}
```

### Emitir um boleto

`POST /transactions/boleto` · escopo `transactions:write` · até 25 requisições por segundo

Emite um boleto para receber.

Headers:

- `idempotency-key` (string, obrigatório): Chave de idempotência, obrigatória. De 8 a 128 caracteres.

Corpo da requisição (JSON):

- `account_id` (string · uuid, obrigatório)
- `amount_cents` (integer, obrigatório): Valor em centavos, inteiro, sem casas decimais. Mínimo `1`.
- `due_date` (string · date, obrigatório)
- `payer_name` (string, obrigatório)
- `payer_document` (string, obrigatório)
- `payer_address` (object): Endereço do pagador. Obrigatório quando o provedor da instituição registra o boleto com ele; caso contrário, ignorado. Vai para o provedor e não é guardado.
  - `street` (string, obrigatório): Rua, número e complemento. De 1 a 255 caracteres.
  - `district` (string, obrigatório): De 1 a 255 caracteres.
  - `city` (string, obrigatório): De 1 a 255 caracteres.
  - `state` (string, obrigatório)
  - `postal_code` (string, obrigatório)
- `description` (string)

Resposta `200`: um objeto `IssuedBoleto`. Erros: `401`, `403`, `409`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `id` (string · uuid, obrigatório)
- `account_id` (string · uuid, obrigatório)
- `customer_id` (string · uuid, obrigatório)
- `type` (string, obrigatório): Um de: `pix`, `ted`, `boleto`, `internal`.
- `direction` (string, obrigatório): Um de: `inbound`, `outbound`.
- `status` (string, obrigatório): `pending_provider` is neither success nor failure: the transaction is settling at the provider. Um de: `created`, `pending_provider`, `settled`, `failed`, `returned`.
- `channel` (string, obrigatório)
- `amount_cents` (string, obrigatório): Valor em centavos.
- `fee_cents` (string, obrigatório): Valor em centavos.
- `description` (string · null, obrigatório)
- `counterparty` (Counterparty, obrigatório): A contraparte da transação. Chave e documento SEMPRE chegam mascarados.
  - `key` (string · null, obrigatório): Chave mascarada, por exemplo `jo***@example.com`.
  - `key_type` (string · null, obrigatório)
  - `name` (string · null, obrigatório)
  - `document` (string · null, obrigatório): Documento mascarado, por exemplo `***.456.789-**`.
  - `bank_ispb` (string · null, obrigatório)
  - `account_id` (string · uuid · null, obrigatório): Preenchido numa transferência interna.
- `provider_ref` (string · null, obrigatório)
- `end_to_end_id` (string · null, obrigatório)
- `funds_held` (boolean, obrigatório): Valor em bloqueio cautelar, aguardando decisão da instituição.
- `held_cents` (string, obrigatório): Valor em centavos.
- `failure_reason` (string · null, obrigatório)
- `compliance_decision` (string · null, obrigatório)
- `metadata` (object, obrigatório)
- `requested_at` (string · date-time, obrigatório)
- `settled_at` (string · date-time · null, obrigatório)
- `failed_at` (string · date-time · null, obrigatório)
- `returned_at` (string · date-time · null, obrigatório)
- `barcode` (string · null, obrigatório)
- `digitable_line` (string · null, obrigatório)
- `due_date` (string · date · null, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/transactions/boleto \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Idempotency-Key: pedido-48213" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
    "amount_cents": 15990,
    "due_date": "2026-11-19",
    "payer_name": "string",
    "payer_document": "string",
    "payer_address": {
      "street": "string",
      "district": "string",
      "city": "string",
      "state": "string",
      "postal_code": "string"
    },
    "description": "string"
  }'
```

```json
{
  "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "type": "pix",
  "direction": "inbound",
  "status": "created",
  "channel": "string",
  "amount_cents": "15990",
  "fee_cents": "15990",
  "description": "string",
  "counterparty": {
    "key": "string",
    "key_type": "string",
    "name": "string",
    "document": "string",
    "bank_ispb": "string",
    "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f"
  },
  "provider_ref": "string",
  "end_to_end_id": "string",
  "funds_held": false,
  "held_cents": "15990",
  "failure_reason": "string",
  "compliance_decision": "string",
  "metadata": {},
  "requested_at": "2026-11-19T18:00:00.000Z",
  "settled_at": "2026-11-19T18:00:00.000Z",
  "failed_at": "2026-11-19T18:00:00.000Z",
  "returned_at": "2026-11-19T18:00:00.000Z",
  "barcode": "string",
  "digitable_line": "string",
  "due_date": "2026-11-19"
}
```

### Criar um QR Code

`POST /transactions/pix-charges` · escopo `transactions:write` · até 25 requisições por segundo

Cria uma cobrança Pix de valor fixo, paga uma vez, até vencer. A resposta traz o BR Code (Pix copia e cola). Nada se move até alguém pagar.

Headers:

- `idempotency-key` (string, obrigatório): Chave de idempotência, obrigatória. De 8 a 128 caracteres.

Corpo da requisição (JSON):

- `account_id` (string · uuid, obrigatório)
- `amount_cents` (integer, obrigatório): Valor em centavos, inteiro, sem casas decimais. Mínimo `1`.
- `description` (string): What the payer sees in their bank app.
- `expires_in_seconds` (integer): How long the code can be paid: 5 minutes to 7 days. Default 24 hours. De `300` a `604800`.
- `splits` (object[]): Who else gets part of the payment: up to 10, one per Pix key.
  - `key` (string, obrigatório): The recipient's Pix key: CPF, CNPJ, e-mail, phone with area code or random key. De 1 a 77 caracteres.
  - `amount_cents` (integer, obrigatório): Valor em centavos, inteiro, sem casas decimais. Mínimo `1`.

Resposta `200`: um objeto `PixCharge`. Erros: `401`, `403`, `404`, `409`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `id` (string · uuid, obrigatório)
- `account_id` (string · uuid, obrigatório)
- `customer_id` (string · uuid, obrigatório)
- `status` (string, obrigatório): `active`: payable. `paid`: a Pix paid it. `expired`: past `expires_at` unpaid. `failed`: the provider refused it or did not answer, so no code was handed out (`failure_reason`). `creating`: the provider is being asked. Um de: `creating`, `active`, `paid`, `expired`, `failed`.
- `amount_cents` (string, obrigatório): Valor em centavos.
- `fee_cents` (string, obrigatório): The Plataforma's fee the provider takes out of the payment as it arrives: the payer pays `amount_cents`, the account receives `amount_cents - fee_cents`. Set when the code was created; "0" when there is none.
- `description` (string · null, obrigatório)
- `emv` (string · null, obrigatório): The BR Code ("Pix copia e cola"). Null unless the provider created it.
- `expires_at` (string · date-time, obrigatório)
- `provider_ref` (string · null, obrigatório)
- `failure_reason` (string · null, obrigatório)
- `paid_transaction_id` (string · uuid · null, obrigatório)
- `paid_amount_cents` (string · null, obrigatório): Valor em centavos.
- `paid_at` (string · date-time · null, obrigatório)
- `created_at` (string · date-time, obrigatório)
- `splits` (PixChargeSplit[], obrigatório): Who else gets part of the payment, in the order asked; empty for a charge without splits. The provider pays each split out of the account after the payment, on its own.
  - `id` (string · uuid, obrigatório): The split. Webhooks `pix_charge.split_*` name it as `splitId`.
  - `charge_id` (string · uuid, obrigatório)
  - `position` (integer, obrigatório): Its place in the order asked, from 1. De `1` a `10`.
  - `account_id` (string · uuid, obrigatório)
  - `key_mask` (string, obrigatório)
  - `key_type` (string, obrigatório): Um de: `cpf`, `cnpj`, `email`, `phone`, `random`.
  - `amount_cents` (string, obrigatório): Valor em centavos.
  - `recipient_name` (string · null, obrigatório): The key's holder, as the provider named them.
  - `recipient_document_mask` (string · null, obrigatório)
  - `status` (string, obrigatório): `awaiting_payment`: the charge was not paid yet. `reserved`: it was, and the split is kept from the available balance until the provider pays it out. `not_reserved`: what arrived did not cover the splits, so nothing was kept. `released`: the provider did not pay it for three days and the institution handed the reserve back to the account. `paid`: the provider paid it (`paid_transaction_id`), also after a release. Um de: `awaiting_payment`, `reserved`, `not_reserved`, `released`, `paid`.
  - `due_since` (string · date-time · null, obrigatório): When the charge was paid: owed from then on.
  - `overdue_flagged_at` (string · date-time · null, obrigatório): When it was flagged as still unpaid by the provider three days after the payment.
  - `released_at` (string · date-time · null, obrigatório)
  - `paid_transaction_id` (string · uuid · null, obrigatório)
  - `paid_at` (string · date-time · null, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/transactions/pix-charges \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Idempotency-Key: pedido-48213" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
    "amount_cents": 15990,
    "description": "string",
    "expires_in_seconds": 1,
    "splits": [
      {
        "key": "string",
        "amount_cents": 15990
      }
    ]
  }'
```

```json
{
  "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "status": "creating",
  "amount_cents": "15990",
  "fee_cents": "15990",
  "description": "string",
  "emv": "string",
  "expires_at": "2026-11-19T18:00:00.000Z",
  "provider_ref": "string",
  "failure_reason": "string",
  "paid_transaction_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "paid_amount_cents": "15990",
  "paid_at": "2026-11-19T18:00:00.000Z",
  "created_at": "2026-11-19T18:00:00.000Z",
  "splits": [
    {
      "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "charge_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "position": 1,
      "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "key_mask": "string",
      "key_type": "cpf",
      "amount_cents": "15990",
      "recipient_name": "string",
      "recipient_document_mask": "string",
      "status": "awaiting_payment",
      "due_since": "2026-11-19T18:00:00.000Z",
      "overdue_flagged_at": "2026-11-19T18:00:00.000Z",
      "released_at": "2026-11-19T18:00:00.000Z",
      "paid_transaction_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "paid_at": "2026-11-19T18:00:00.000Z"
    }
  ]
}
```

### Consultar um QR Code

`GET /transactions/pix-charges/{id}` · escopo `transactions:read` · até 25 requisições por segundo

Lê uma cobrança: ativa, paga, vencida ou recusada pelo provedor, e o Pix que a pagou.

Parâmetros de caminho:

- `id` (string · uuid, obrigatório)

Resposta `200`: um objeto `PixCharge`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `id` (string · uuid, obrigatório)
- `account_id` (string · uuid, obrigatório)
- `customer_id` (string · uuid, obrigatório)
- `status` (string, obrigatório): `active`: payable. `paid`: a Pix paid it. `expired`: past `expires_at` unpaid. `failed`: the provider refused it or did not answer, so no code was handed out (`failure_reason`). `creating`: the provider is being asked. Um de: `creating`, `active`, `paid`, `expired`, `failed`.
- `amount_cents` (string, obrigatório): Valor em centavos.
- `fee_cents` (string, obrigatório): The Plataforma's fee the provider takes out of the payment as it arrives: the payer pays `amount_cents`, the account receives `amount_cents - fee_cents`. Set when the code was created; "0" when there is none.
- `description` (string · null, obrigatório)
- `emv` (string · null, obrigatório): The BR Code ("Pix copia e cola"). Null unless the provider created it.
- `expires_at` (string · date-time, obrigatório)
- `provider_ref` (string · null, obrigatório)
- `failure_reason` (string · null, obrigatório)
- `paid_transaction_id` (string · uuid · null, obrigatório)
- `paid_amount_cents` (string · null, obrigatório): Valor em centavos.
- `paid_at` (string · date-time · null, obrigatório)
- `created_at` (string · date-time, obrigatório)
- `splits` (PixChargeSplit[], obrigatório): Who else gets part of the payment, in the order asked; empty for a charge without splits. The provider pays each split out of the account after the payment, on its own.
  - `id` (string · uuid, obrigatório): The split. Webhooks `pix_charge.split_*` name it as `splitId`.
  - `charge_id` (string · uuid, obrigatório)
  - `position` (integer, obrigatório): Its place in the order asked, from 1. De `1` a `10`.
  - `account_id` (string · uuid, obrigatório)
  - `key_mask` (string, obrigatório)
  - `key_type` (string, obrigatório): Um de: `cpf`, `cnpj`, `email`, `phone`, `random`.
  - `amount_cents` (string, obrigatório): Valor em centavos.
  - `recipient_name` (string · null, obrigatório): The key's holder, as the provider named them.
  - `recipient_document_mask` (string · null, obrigatório)
  - `status` (string, obrigatório): `awaiting_payment`: the charge was not paid yet. `reserved`: it was, and the split is kept from the available balance until the provider pays it out. `not_reserved`: what arrived did not cover the splits, so nothing was kept. `released`: the provider did not pay it for three days and the institution handed the reserve back to the account. `paid`: the provider paid it (`paid_transaction_id`), also after a release. Um de: `awaiting_payment`, `reserved`, `not_reserved`, `released`, `paid`.
  - `due_since` (string · date-time · null, obrigatório): When the charge was paid: owed from then on.
  - `overdue_flagged_at` (string · date-time · null, obrigatório): When it was flagged as still unpaid by the provider three days after the payment.
  - `released_at` (string · date-time · null, obrigatório)
  - `paid_transaction_id` (string · uuid · null, obrigatório)
  - `paid_at` (string · date-time · null, obrigatório)

Exemplo:

```bash
curl https://api.ingot.com.br/transactions/pix-charges/$ID \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "status": "creating",
  "amount_cents": "15990",
  "fee_cents": "15990",
  "description": "string",
  "emv": "string",
  "expires_at": "2026-11-19T18:00:00.000Z",
  "provider_ref": "string",
  "failure_reason": "string",
  "paid_transaction_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "paid_amount_cents": "15990",
  "paid_at": "2026-11-19T18:00:00.000Z",
  "created_at": "2026-11-19T18:00:00.000Z",
  "splits": [
    {
      "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "charge_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "position": 1,
      "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "key_mask": "string",
      "key_type": "cpf",
      "amount_cents": "15990",
      "recipient_name": "string",
      "recipient_document_mask": "string",
      "status": "awaiting_payment",
      "due_since": "2026-11-19T18:00:00.000Z",
      "overdue_flagged_at": "2026-11-19T18:00:00.000Z",
      "released_at": "2026-11-19T18:00:00.000Z",
      "paid_transaction_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "paid_at": "2026-11-19T18:00:00.000Z"
    }
  ]
}
```

### Listar QR Codes

`GET /transactions/pix-charges` · escopo `transactions:read` · até 25 requisições por segundo

As cobranças de uma conta, das mais novas para as mais antigas, paginadas por before.

Parâmetros de consulta:

- `account_id` (string · uuid)
- `status` (string): Um de: `creating`, `active`, `paid`, `expired`, `failed`.
- `limit` (integer): De `1` a `200`.
- `before` (string · uuid)

Resposta `200`: um objeto `PixChargeList`. Erros: `401`, `403`, `404`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `data` (PixCharge[], obrigatório)
  - `id` (string · uuid, obrigatório)
  - `account_id` (string · uuid, obrigatório)
  - `customer_id` (string · uuid, obrigatório)
  - `status` (string, obrigatório): `active`: payable. `paid`: a Pix paid it. `expired`: past `expires_at` unpaid. `failed`: the provider refused it or did not answer, so no code was handed out (`failure_reason`). `creating`: the provider is being asked. Um de: `creating`, `active`, `paid`, `expired`, `failed`.
  - `amount_cents` (string, obrigatório): Valor em centavos.
  - `fee_cents` (string, obrigatório): The Plataforma's fee the provider takes out of the payment as it arrives: the payer pays `amount_cents`, the account receives `amount_cents - fee_cents`. Set when the code was created; "0" when there is none.
  - `description` (string · null, obrigatório)
  - `emv` (string · null, obrigatório): The BR Code ("Pix copia e cola"). Null unless the provider created it.
  - `expires_at` (string · date-time, obrigatório)
  - `provider_ref` (string · null, obrigatório)
  - `failure_reason` (string · null, obrigatório)
  - `paid_transaction_id` (string · uuid · null, obrigatório)
  - `paid_amount_cents` (string · null, obrigatório): Valor em centavos.
  - `paid_at` (string · date-time · null, obrigatório)
  - `created_at` (string · date-time, obrigatório)
  - `splits` (PixChargeSplit[], obrigatório): Who else gets part of the payment, in the order asked; empty for a charge without splits. The provider pays each split out of the account after the payment, on its own.
    - `id` (string · uuid, obrigatório): The split. Webhooks `pix_charge.split_*` name it as `splitId`.
    - `charge_id` (string · uuid, obrigatório)
    - `position` (integer, obrigatório): Its place in the order asked, from 1. De `1` a `10`.
    - `account_id` (string · uuid, obrigatório)
    - `key_mask` (string, obrigatório)
    - `key_type` (string, obrigatório): Um de: `cpf`, `cnpj`, `email`, `phone`, `random`.
    - `amount_cents` (string, obrigatório): Valor em centavos.
    - `recipient_name` (string · null, obrigatório): The key's holder, as the provider named them.
    - `recipient_document_mask` (string · null, obrigatório)
    - `status` (string, obrigatório): `awaiting_payment`: the charge was not paid yet. `reserved`: it was, and the split is kept from the available balance until the provider pays it out. `not_reserved`: what arrived did not cover the splits, so nothing was kept. `released`: the provider did not pay it for three days and the institution handed the reserve back to the account. `paid`: the provider paid it (`paid_transaction_id`), also after a release. Um de: `awaiting_payment`, `reserved`, `not_reserved`, `released`, `paid`.
    - `due_since` (string · date-time · null, obrigatório): When the charge was paid: owed from then on.
    - `overdue_flagged_at` (string · date-time · null, obrigatório): When it was flagged as still unpaid by the provider three days after the payment.
    - `released_at` (string · date-time · null, obrigatório)
    - `paid_transaction_id` (string · uuid · null, obrigatório)
    - `paid_at` (string · date-time · null, obrigatório)

Exemplo:

```bash
curl "https://api.ingot.com.br/transactions/pix-charges?account_id=$ACCOUNT_ID" \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "data": [
    {
      "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "status": "creating",
      "amount_cents": "15990",
      "fee_cents": "15990",
      "description": "string",
      "emv": "string",
      "expires_at": "2026-11-19T18:00:00.000Z",
      "provider_ref": "string",
      "failure_reason": "string",
      "paid_transaction_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "paid_amount_cents": "15990",
      "paid_at": "2026-11-19T18:00:00.000Z",
      "created_at": "2026-11-19T18:00:00.000Z",
      "splits": [
        {
          "id": null,
          "charge_id": null,
          "position": null,
          "account_id": null,
          "key_mask": null,
          "key_type": null,
          "amount_cents": null,
          "recipient_name": null,
          "recipient_document_mask": null,
          "status": null,
          "due_since": null,
          "overdue_flagged_at": null,
          "released_at": null,
          "paid_transaction_id": null,
          "paid_at": null
        }
      ]
    }
  ]
}
```

### Criar uma assinatura por Pix

`POST /transactions/pix-subscriptions` · escopo `transactions:write` · até 25 requisições por segundo

Pix Automático: o pagador autoriza uma vez pelo BR Code e o banco dele paga cada período sozinho. Nada se move ao criar.

Headers:

- `idempotency-key` (string, obrigatório): Chave de idempotência, obrigatória. De 8 a 128 caracteres.

Corpo da requisição (JSON):

- `account_id` (string · uuid, obrigatório)
- `payer` (object, obrigatório)
  - `document` (string, obrigatório): CPF or CNPJ, with or without punctuation. De 11 a 18 caracteres.
  - `name` (string, obrigatório): De 1 a 140 caracteres.
- `description` (string, obrigatório): What the payer's bank shows. De 1 a 35 caracteres.
- `contract_number` (string): Your reference, shown beside it in the payer's bank. Default: the subscription's id. De 1 a 35 caracteres.
- `periodicity` (string, obrigatório): Um de: `weekly`, `monthly`, `quarterly`, `semiannual`, `yearly`.
- `amount_cents` (integer, obrigatório): Valor em centavos, inteiro, sem casas decimais. Mínimo `1`.
- `first_payment_cents` (integer): Valor em centavos, inteiro, sem casas decimais. Mínimo `1`.
- `start_date` (string, obrigatório): YYYY-MM-DD: the first period charged, 3 to 366 days from today.
- `end_date` (string): YYYY-MM-DD: the last day a period can be charged. Absent: until cancelled.
- `retry` (boolean): Whether the provider tries a period again when the payer's bank does not pay it.
- `authorization_expires_in_seconds` (integer): How long the code can be scanned: 5 minutes to 7 days. Default 24 hours. De `300` a `604800`.

Resposta `200`: um objeto `PixSubscription`. Erros: `401`, `403`, `404`, `409`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `id` (string · uuid, obrigatório)
- `account_id` (string · uuid, obrigatório)
- `customer_id` (string · uuid, obrigatório)
- `status` (string, obrigatório): `awaiting_authorization`: the payer has not scanned the code yet. `active`: authorized; the payer's bank pays each period. `rejected`: the payer refused it. `expired`: the payer did not authorize it before `authorization_expires_at`. `cancelled`: it ended (`ended_by`). `failed`: the provider refused it or did not answer, so no code was handed out (`failure_reason`). `creating`: the provider is being asked. Um de: `creating`, `awaiting_authorization`, `active`, `rejected`, `expired`, `cancelled`, `failed`.
- `payer` (object, obrigatório)
  - `name` (string, obrigatório)
  - `document_mask` (string, obrigatório)
- `description` (string, obrigatório): What the payer's bank shows.
- `contract_number` (string, obrigatório)
- `periodicity` (string, obrigatório): Um de: `weekly`, `monthly`, `quarterly`, `semiannual`, `yearly`.
- `amount_cents` (string, obrigatório): Valor em centavos.
- `first_payment_cents` (string · null, obrigatório): Paid with the authorization itself; null when none.
- `start_date` (string · date, obrigatório): The first period charged.
- `end_date` (string · date · null, obrigatório): The last day a period can be charged; null: until cancelled.
- `retry` (boolean, obrigatório): Whether the provider tries a period again when the payer cannot pay.
- `fee_cents` (string, obrigatório): The Plataforma's fee per period paid, set when the subscription was created (the price then), "0" when none. The provider takes no fee on a recurrence, so the core keeps it from the account as each period is credited and sends what it kept to the Plataforma's account once a month: the account gets `amount_cents - fee_cents` per period (and pays the provider its own cost per Pix received, as on any Pix).
- `emv` (string · null, obrigatório): The BR Code the payer scans to authorize ("Pix copia e cola"). Null unless the provider created it.
- `authorization_expires_at` (string · date-time, obrigatório)
- `provider_ref` (string · null, obrigatório)
- `failure_reason` (string · null, obrigatório)
- `authorized_at` (string · date-time · null, obrigatório)
- `ended_at` (string · date-time · null, obrigatório)
- `ended_by` (any, obrigatório): Who ended it: `receiver` the account's side, `payer` their bank, `provider` the provider on its own.
- `end_reason` (string · null, obrigatório)
- `cancel_requested_at` (string · date-time · null, obrigatório): A cancellation the provider has not confirmed yet; the status changes when it does.
- `created_at` (string · date-time, obrigatório)
- `installments` (PixSubscriptionInstallment[], obrigatório): Its periods, oldest first. Only when reading one subscription; empty in lists.
  - `id` (string · uuid, obrigatório)
  - `subscription_id` (string · uuid, obrigatório)
  - `kind` (string, obrigatório): Um de: `first_payment`, `charge`.
  - `due_date` (string · date · null, obrigatório): The day the payer is charged; null until the provider says.
  - `amount_cents` (string, obrigatório): Valor em centavos.
  - `status` (string, obrigatório): `scheduled`: not paid yet. `paid`: the Pix arrived and was credited. `failed`: the payer's bank did not pay it and the provider gave up (`failure_reason`). `cancelled`: it will not be charged (the subscription ended, or the period was cancelled). Um de: `scheduled`, `paid`, `failed`, `cancelled`.
  - `attempts` (integer, obrigatório): How many times the provider tried to charge it. Mínimo `0`.
  - `failure_reason` (string · null, obrigatório)
  - `paid_transaction_id` (string · uuid · null, obrigatório)
  - `paid_amount_cents` (string · null, obrigatório): Valor em centavos.
  - `paid_at` (string · date-time · null, obrigatório)
  - `fee_cents` (string, obrigatório): The Plataforma's fee kept from this period's payment when it was paid; "0" before then, when the subscription has none, or when what arrived did not cover it.
  - `created_at` (string · date-time, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/transactions/pix-subscriptions \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Idempotency-Key: pedido-48213" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
    "payer": {
      "document": "string",
      "name": "string"
    },
    "description": "string",
    "contract_number": "string",
    "periodicity": "weekly",
    "amount_cents": 15990,
    "first_payment_cents": 15990,
    "start_date": "string",
    "end_date": "string",
    "retry": false,
    "authorization_expires_in_seconds": 1
  }'
```

```json
{
  "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "status": "creating",
  "payer": {
    "name": "string",
    "document_mask": "string"
  },
  "description": "string",
  "contract_number": "string",
  "periodicity": "weekly",
  "amount_cents": "15990",
  "first_payment_cents": "15990",
  "start_date": "2026-11-19",
  "end_date": "2026-11-19",
  "retry": false,
  "fee_cents": "15990",
  "emv": "string",
  "authorization_expires_at": "2026-11-19T18:00:00.000Z",
  "provider_ref": "string",
  "failure_reason": "string",
  "authorized_at": "2026-11-19T18:00:00.000Z",
  "ended_at": "2026-11-19T18:00:00.000Z",
  "ended_by": "string",
  "end_reason": "string",
  "cancel_requested_at": "2026-11-19T18:00:00.000Z",
  "created_at": "2026-11-19T18:00:00.000Z",
  "installments": [
    {
      "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "subscription_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "kind": "first_payment",
      "due_date": "2026-11-19",
      "amount_cents": "15990",
      "status": "scheduled",
      "attempts": 1,
      "failure_reason": "string",
      "paid_transaction_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "paid_amount_cents": "15990",
      "paid_at": "2026-11-19T18:00:00.000Z",
      "fee_cents": "15990",
      "created_at": "2026-11-19T18:00:00.000Z"
    }
  ]
}
```

### Consultar uma assinatura

`GET /transactions/pix-subscriptions/{id}` · escopo `transactions:read` · até 25 requisições por segundo

Lê uma assinatura e os períodos dela: agendados, pagos, com falha ou cancelados, e o Pix que pagou cada um.

Parâmetros de caminho:

- `id` (string · uuid, obrigatório)

Resposta `200`: um objeto `PixSubscription`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `id` (string · uuid, obrigatório)
- `account_id` (string · uuid, obrigatório)
- `customer_id` (string · uuid, obrigatório)
- `status` (string, obrigatório): `awaiting_authorization`: the payer has not scanned the code yet. `active`: authorized; the payer's bank pays each period. `rejected`: the payer refused it. `expired`: the payer did not authorize it before `authorization_expires_at`. `cancelled`: it ended (`ended_by`). `failed`: the provider refused it or did not answer, so no code was handed out (`failure_reason`). `creating`: the provider is being asked. Um de: `creating`, `awaiting_authorization`, `active`, `rejected`, `expired`, `cancelled`, `failed`.
- `payer` (object, obrigatório)
  - `name` (string, obrigatório)
  - `document_mask` (string, obrigatório)
- `description` (string, obrigatório): What the payer's bank shows.
- `contract_number` (string, obrigatório)
- `periodicity` (string, obrigatório): Um de: `weekly`, `monthly`, `quarterly`, `semiannual`, `yearly`.
- `amount_cents` (string, obrigatório): Valor em centavos.
- `first_payment_cents` (string · null, obrigatório): Paid with the authorization itself; null when none.
- `start_date` (string · date, obrigatório): The first period charged.
- `end_date` (string · date · null, obrigatório): The last day a period can be charged; null: until cancelled.
- `retry` (boolean, obrigatório): Whether the provider tries a period again when the payer cannot pay.
- `fee_cents` (string, obrigatório): The Plataforma's fee per period paid, set when the subscription was created (the price then), "0" when none. The provider takes no fee on a recurrence, so the core keeps it from the account as each period is credited and sends what it kept to the Plataforma's account once a month: the account gets `amount_cents - fee_cents` per period (and pays the provider its own cost per Pix received, as on any Pix).
- `emv` (string · null, obrigatório): The BR Code the payer scans to authorize ("Pix copia e cola"). Null unless the provider created it.
- `authorization_expires_at` (string · date-time, obrigatório)
- `provider_ref` (string · null, obrigatório)
- `failure_reason` (string · null, obrigatório)
- `authorized_at` (string · date-time · null, obrigatório)
- `ended_at` (string · date-time · null, obrigatório)
- `ended_by` (any, obrigatório): Who ended it: `receiver` the account's side, `payer` their bank, `provider` the provider on its own.
- `end_reason` (string · null, obrigatório)
- `cancel_requested_at` (string · date-time · null, obrigatório): A cancellation the provider has not confirmed yet; the status changes when it does.
- `created_at` (string · date-time, obrigatório)
- `installments` (PixSubscriptionInstallment[], obrigatório): Its periods, oldest first. Only when reading one subscription; empty in lists.
  - `id` (string · uuid, obrigatório)
  - `subscription_id` (string · uuid, obrigatório)
  - `kind` (string, obrigatório): Um de: `first_payment`, `charge`.
  - `due_date` (string · date · null, obrigatório): The day the payer is charged; null until the provider says.
  - `amount_cents` (string, obrigatório): Valor em centavos.
  - `status` (string, obrigatório): `scheduled`: not paid yet. `paid`: the Pix arrived and was credited. `failed`: the payer's bank did not pay it and the provider gave up (`failure_reason`). `cancelled`: it will not be charged (the subscription ended, or the period was cancelled). Um de: `scheduled`, `paid`, `failed`, `cancelled`.
  - `attempts` (integer, obrigatório): How many times the provider tried to charge it. Mínimo `0`.
  - `failure_reason` (string · null, obrigatório)
  - `paid_transaction_id` (string · uuid · null, obrigatório)
  - `paid_amount_cents` (string · null, obrigatório): Valor em centavos.
  - `paid_at` (string · date-time · null, obrigatório)
  - `fee_cents` (string, obrigatório): The Plataforma's fee kept from this period's payment when it was paid; "0" before then, when the subscription has none, or when what arrived did not cover it.
  - `created_at` (string · date-time, obrigatório)

Exemplo:

```bash
curl https://api.ingot.com.br/transactions/pix-subscriptions/$ID \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "status": "creating",
  "payer": {
    "name": "string",
    "document_mask": "string"
  },
  "description": "string",
  "contract_number": "string",
  "periodicity": "weekly",
  "amount_cents": "15990",
  "first_payment_cents": "15990",
  "start_date": "2026-11-19",
  "end_date": "2026-11-19",
  "retry": false,
  "fee_cents": "15990",
  "emv": "string",
  "authorization_expires_at": "2026-11-19T18:00:00.000Z",
  "provider_ref": "string",
  "failure_reason": "string",
  "authorized_at": "2026-11-19T18:00:00.000Z",
  "ended_at": "2026-11-19T18:00:00.000Z",
  "ended_by": "string",
  "end_reason": "string",
  "cancel_requested_at": "2026-11-19T18:00:00.000Z",
  "created_at": "2026-11-19T18:00:00.000Z",
  "installments": [
    {
      "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "subscription_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "kind": "first_payment",
      "due_date": "2026-11-19",
      "amount_cents": "15990",
      "status": "scheduled",
      "attempts": 1,
      "failure_reason": "string",
      "paid_transaction_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "paid_amount_cents": "15990",
      "paid_at": "2026-11-19T18:00:00.000Z",
      "fee_cents": "15990",
      "created_at": "2026-11-19T18:00:00.000Z"
    }
  ]
}
```

### Listar assinaturas

`GET /transactions/pix-subscriptions` · escopo `transactions:read` · até 25 requisições por segundo

As assinaturas de uma conta, das mais novas para as mais antigas, por status ou pelo CPF/CNPJ do pagador, paginadas por before.

Parâmetros de consulta:

- `account_id` (string · uuid)
- `status` (string): Um de: `creating`, `awaiting_authorization`, `active`, `rejected`, `expired`, `cancelled`, `failed`.
- `payer_document` (string): De 11 a 18 caracteres.
- `limit` (integer): De `1` a `200`.
- `before` (string · uuid)

Resposta `200`: um objeto `PixSubscriptionList`. Erros: `401`, `403`, `404`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `data` (PixSubscription[], obrigatório)
  - `id` (string · uuid, obrigatório)
  - `account_id` (string · uuid, obrigatório)
  - `customer_id` (string · uuid, obrigatório)
  - `status` (string, obrigatório): `awaiting_authorization`: the payer has not scanned the code yet. `active`: authorized; the payer's bank pays each period. `rejected`: the payer refused it. `expired`: the payer did not authorize it before `authorization_expires_at`. `cancelled`: it ended (`ended_by`). `failed`: the provider refused it or did not answer, so no code was handed out (`failure_reason`). `creating`: the provider is being asked. Um de: `creating`, `awaiting_authorization`, `active`, `rejected`, `expired`, `cancelled`, `failed`.
  - `payer` (object, obrigatório)
    - `name` (string, obrigatório)
    - `document_mask` (string, obrigatório)
  - `description` (string, obrigatório): What the payer's bank shows.
  - `contract_number` (string, obrigatório)
  - `periodicity` (string, obrigatório): Um de: `weekly`, `monthly`, `quarterly`, `semiannual`, `yearly`.
  - `amount_cents` (string, obrigatório): Valor em centavos.
  - `first_payment_cents` (string · null, obrigatório): Paid with the authorization itself; null when none.
  - `start_date` (string · date, obrigatório): The first period charged.
  - `end_date` (string · date · null, obrigatório): The last day a period can be charged; null: until cancelled.
  - `retry` (boolean, obrigatório): Whether the provider tries a period again when the payer cannot pay.
  - `fee_cents` (string, obrigatório): The Plataforma's fee per period paid, set when the subscription was created (the price then), "0" when none. The provider takes no fee on a recurrence, so the core keeps it from the account as each period is credited and sends what it kept to the Plataforma's account once a month: the account gets `amount_cents - fee_cents` per period (and pays the provider its own cost per Pix received, as on any Pix).
  - `emv` (string · null, obrigatório): The BR Code the payer scans to authorize ("Pix copia e cola"). Null unless the provider created it.
  - `authorization_expires_at` (string · date-time, obrigatório)
  - `provider_ref` (string · null, obrigatório)
  - `failure_reason` (string · null, obrigatório)
  - `authorized_at` (string · date-time · null, obrigatório)
  - `ended_at` (string · date-time · null, obrigatório)
  - `ended_by` (any, obrigatório): Who ended it: `receiver` the account's side, `payer` their bank, `provider` the provider on its own.
  - `end_reason` (string · null, obrigatório)
  - `cancel_requested_at` (string · date-time · null, obrigatório): A cancellation the provider has not confirmed yet; the status changes when it does.
  - `created_at` (string · date-time, obrigatório)
  - `installments` (PixSubscriptionInstallment[], obrigatório): Its periods, oldest first. Only when reading one subscription; empty in lists.
    - `id` (string · uuid, obrigatório)
    - `subscription_id` (string · uuid, obrigatório)
    - `kind` (string, obrigatório): Um de: `first_payment`, `charge`.
    - `due_date` (string · date · null, obrigatório): The day the payer is charged; null until the provider says.
    - `amount_cents` (string, obrigatório): Valor em centavos.
    - `status` (string, obrigatório): `scheduled`: not paid yet. `paid`: the Pix arrived and was credited. `failed`: the payer's bank did not pay it and the provider gave up (`failure_reason`). `cancelled`: it will not be charged (the subscription ended, or the period was cancelled). Um de: `scheduled`, `paid`, `failed`, `cancelled`.
    - `attempts` (integer, obrigatório): How many times the provider tried to charge it. Mínimo `0`.
    - `failure_reason` (string · null, obrigatório)
    - `paid_transaction_id` (string · uuid · null, obrigatório)
    - `paid_amount_cents` (string · null, obrigatório): Valor em centavos.
    - `paid_at` (string · date-time · null, obrigatório)
    - `fee_cents` (string, obrigatório): The Plataforma's fee kept from this period's payment when it was paid; "0" before then, when the subscription has none, or when what arrived did not cover it.
    - `created_at` (string · date-time, obrigatório)

Exemplo:

```bash
curl "https://api.ingot.com.br/transactions/pix-subscriptions?account_id=$ACCOUNT_ID" \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "data": [
    {
      "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "status": "creating",
      "payer": {
        "name": "string",
        "document_mask": "string"
      },
      "description": "string",
      "contract_number": "string",
      "periodicity": "weekly",
      "amount_cents": "15990",
      "first_payment_cents": "15990",
      "start_date": "2026-11-19",
      "end_date": "2026-11-19",
      "retry": false,
      "fee_cents": "15990",
      "emv": "string",
      "authorization_expires_at": "2026-11-19T18:00:00.000Z",
      "provider_ref": "string",
      "failure_reason": "string",
      "authorized_at": "2026-11-19T18:00:00.000Z",
      "ended_at": "2026-11-19T18:00:00.000Z",
      "ended_by": "string",
      "end_reason": "string",
      "cancel_requested_at": "2026-11-19T18:00:00.000Z",
      "created_at": "2026-11-19T18:00:00.000Z",
      "installments": [
        {
          "id": null,
          "subscription_id": null,
          "kind": null,
          "due_date": null,
          "amount_cents": null,
          "status": null,
          "attempts": null,
          "failure_reason": null,
          "paid_transaction_id": null,
          "paid_amount_cents": null,
          "paid_at": null,
          "fee_cents": null,
          "created_at": null
        }
      ]
    }
  ]
}
```

### Cancelar uma assinatura

`POST /transactions/pix-subscriptions/{id}/cancel` · escopo `transactions:write` · até 25 requisições por segundo

Cancela no provedor e aqui; os períodos agendados são cancelados. Cancelar de novo devolve a mesma assinatura.

Parâmetros de caminho:

- `id` (string · uuid, obrigatório)

Headers:

- `idempotency-key` (string, obrigatório): Chave de idempotência, obrigatória. De 8 a 128 caracteres.

Corpo da requisição (JSON):

- `reason` (string)

Resposta `200`: um objeto `PixSubscription`. Erros: `401`, `403`, `404`, `409`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `id` (string · uuid, obrigatório)
- `account_id` (string · uuid, obrigatório)
- `customer_id` (string · uuid, obrigatório)
- `status` (string, obrigatório): `awaiting_authorization`: the payer has not scanned the code yet. `active`: authorized; the payer's bank pays each period. `rejected`: the payer refused it. `expired`: the payer did not authorize it before `authorization_expires_at`. `cancelled`: it ended (`ended_by`). `failed`: the provider refused it or did not answer, so no code was handed out (`failure_reason`). `creating`: the provider is being asked. Um de: `creating`, `awaiting_authorization`, `active`, `rejected`, `expired`, `cancelled`, `failed`.
- `payer` (object, obrigatório)
  - `name` (string, obrigatório)
  - `document_mask` (string, obrigatório)
- `description` (string, obrigatório): What the payer's bank shows.
- `contract_number` (string, obrigatório)
- `periodicity` (string, obrigatório): Um de: `weekly`, `monthly`, `quarterly`, `semiannual`, `yearly`.
- `amount_cents` (string, obrigatório): Valor em centavos.
- `first_payment_cents` (string · null, obrigatório): Paid with the authorization itself; null when none.
- `start_date` (string · date, obrigatório): The first period charged.
- `end_date` (string · date · null, obrigatório): The last day a period can be charged; null: until cancelled.
- `retry` (boolean, obrigatório): Whether the provider tries a period again when the payer cannot pay.
- `fee_cents` (string, obrigatório): The Plataforma's fee per period paid, set when the subscription was created (the price then), "0" when none. The provider takes no fee on a recurrence, so the core keeps it from the account as each period is credited and sends what it kept to the Plataforma's account once a month: the account gets `amount_cents - fee_cents` per period (and pays the provider its own cost per Pix received, as on any Pix).
- `emv` (string · null, obrigatório): The BR Code the payer scans to authorize ("Pix copia e cola"). Null unless the provider created it.
- `authorization_expires_at` (string · date-time, obrigatório)
- `provider_ref` (string · null, obrigatório)
- `failure_reason` (string · null, obrigatório)
- `authorized_at` (string · date-time · null, obrigatório)
- `ended_at` (string · date-time · null, obrigatório)
- `ended_by` (any, obrigatório): Who ended it: `receiver` the account's side, `payer` their bank, `provider` the provider on its own.
- `end_reason` (string · null, obrigatório)
- `cancel_requested_at` (string · date-time · null, obrigatório): A cancellation the provider has not confirmed yet; the status changes when it does.
- `created_at` (string · date-time, obrigatório)
- `installments` (PixSubscriptionInstallment[], obrigatório): Its periods, oldest first. Only when reading one subscription; empty in lists.
  - `id` (string · uuid, obrigatório)
  - `subscription_id` (string · uuid, obrigatório)
  - `kind` (string, obrigatório): Um de: `first_payment`, `charge`.
  - `due_date` (string · date · null, obrigatório): The day the payer is charged; null until the provider says.
  - `amount_cents` (string, obrigatório): Valor em centavos.
  - `status` (string, obrigatório): `scheduled`: not paid yet. `paid`: the Pix arrived and was credited. `failed`: the payer's bank did not pay it and the provider gave up (`failure_reason`). `cancelled`: it will not be charged (the subscription ended, or the period was cancelled). Um de: `scheduled`, `paid`, `failed`, `cancelled`.
  - `attempts` (integer, obrigatório): How many times the provider tried to charge it. Mínimo `0`.
  - `failure_reason` (string · null, obrigatório)
  - `paid_transaction_id` (string · uuid · null, obrigatório)
  - `paid_amount_cents` (string · null, obrigatório): Valor em centavos.
  - `paid_at` (string · date-time · null, obrigatório)
  - `fee_cents` (string, obrigatório): The Plataforma's fee kept from this period's payment when it was paid; "0" before then, when the subscription has none, or when what arrived did not cover it.
  - `created_at` (string · date-time, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/transactions/pix-subscriptions/$ID/cancel \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Idempotency-Key: pedido-48213" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "string"
  }'
```

```json
{
  "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "status": "creating",
  "payer": {
    "name": "string",
    "document_mask": "string"
  },
  "description": "string",
  "contract_number": "string",
  "periodicity": "weekly",
  "amount_cents": "15990",
  "first_payment_cents": "15990",
  "start_date": "2026-11-19",
  "end_date": "2026-11-19",
  "retry": false,
  "fee_cents": "15990",
  "emv": "string",
  "authorization_expires_at": "2026-11-19T18:00:00.000Z",
  "provider_ref": "string",
  "failure_reason": "string",
  "authorized_at": "2026-11-19T18:00:00.000Z",
  "ended_at": "2026-11-19T18:00:00.000Z",
  "ended_by": "string",
  "end_reason": "string",
  "cancel_requested_at": "2026-11-19T18:00:00.000Z",
  "created_at": "2026-11-19T18:00:00.000Z",
  "installments": [
    {
      "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "subscription_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "kind": "first_payment",
      "due_date": "2026-11-19",
      "amount_cents": "15990",
      "status": "scheduled",
      "attempts": 1,
      "failure_reason": "string",
      "paid_transaction_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "paid_amount_cents": "15990",
      "paid_at": "2026-11-19T18:00:00.000Z",
      "fee_cents": "15990",
      "created_at": "2026-11-19T18:00:00.000Z"
    }
  ]
}
```

### Enviar uma TEF

`POST /transactions/internal` · escopo `transactions:write` · até 25 requisições por segundo

TEF: transferência entre duas contas da mesma instituição, liquidada na hora direto no ledger, sem passar pelo provedor.

Headers:

- `idempotency-key` (string, obrigatório): Chave de idempotência, obrigatória. De 8 a 128 caracteres.

Corpo da requisição (JSON):

- `account_id` (string · uuid, obrigatório)
- `destination_account_id` (string · uuid, obrigatório)
- `amount_cents` (integer, obrigatório): Valor em centavos, inteiro, sem casas decimais. Mínimo `1`.
- `description` (string)

Resposta `200`: um objeto `Transaction`. Erros: `401`, `403`, `409`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `id` (string · uuid, obrigatório)
- `account_id` (string · uuid, obrigatório)
- `customer_id` (string · uuid, obrigatório)
- `type` (string, obrigatório): Um de: `pix`, `ted`, `boleto`, `internal`.
- `direction` (string, obrigatório): Um de: `inbound`, `outbound`.
- `status` (string, obrigatório): `pending_provider` is neither success nor failure: the transaction is settling at the provider. Um de: `created`, `pending_provider`, `settled`, `failed`, `returned`.
- `channel` (string, obrigatório)
- `amount_cents` (string, obrigatório): Valor em centavos.
- `fee_cents` (string, obrigatório): Valor em centavos.
- `description` (string · null, obrigatório)
- `counterparty` (Counterparty, obrigatório): A contraparte da transação. Chave e documento SEMPRE chegam mascarados.
  - `key` (string · null, obrigatório): Chave mascarada, por exemplo `jo***@example.com`.
  - `key_type` (string · null, obrigatório)
  - `name` (string · null, obrigatório)
  - `document` (string · null, obrigatório): Documento mascarado, por exemplo `***.456.789-**`.
  - `bank_ispb` (string · null, obrigatório)
  - `account_id` (string · uuid · null, obrigatório): Preenchido numa transferência interna.
- `provider_ref` (string · null, obrigatório)
- `end_to_end_id` (string · null, obrigatório)
- `funds_held` (boolean, obrigatório): Valor em bloqueio cautelar, aguardando decisão da instituição.
- `held_cents` (string, obrigatório): Valor em centavos.
- `failure_reason` (string · null, obrigatório)
- `compliance_decision` (string · null, obrigatório)
- `metadata` (object, obrigatório)
- `requested_at` (string · date-time, obrigatório)
- `settled_at` (string · date-time · null, obrigatório)
- `failed_at` (string · date-time · null, obrigatório)
- `returned_at` (string · date-time · null, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/transactions/internal \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Idempotency-Key: pedido-48213" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
    "destination_account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
    "amount_cents": 15990,
    "description": "string"
  }'
```

```json
{
  "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "type": "pix",
  "direction": "inbound",
  "status": "created",
  "channel": "string",
  "amount_cents": "15990",
  "fee_cents": "15990",
  "description": "string",
  "counterparty": {
    "key": "string",
    "key_type": "string",
    "name": "string",
    "document": "string",
    "bank_ispb": "string",
    "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f"
  },
  "provider_ref": "string",
  "end_to_end_id": "string",
  "funds_held": false,
  "held_cents": "15990",
  "failure_reason": "string",
  "compliance_decision": "string",
  "metadata": {},
  "requested_at": "2026-11-19T18:00:00.000Z",
  "settled_at": "2026-11-19T18:00:00.000Z",
  "failed_at": "2026-11-19T18:00:00.000Z",
  "returned_at": "2026-11-19T18:00:00.000Z"
}
```

### Listar transações

`GET /transactions` · escopo `transactions:read` · até 25 requisições por segundo

Lista as transações de uma conta.

Parâmetros de consulta:

- `account_id` (string · uuid)
- `customer_id` (string · uuid)
- `status` (string): Um de: `created`, `pending_provider`, `settled`, `failed`, `returned`.
- `type` (string): Um de: `pix`, `ted`, `boleto`, `internal`.
- `direction` (string): Um de: `inbound`, `outbound`.
- `funds_held` (boolean): Só transações com bloqueio cautelar ativo.
- `from` (string · date-time)
- `to` (string · date-time)
- `limit` (integer): De `1` a `200`.
- `offset` (integer): Mínimo `0`.

Resposta `200`: um objeto `TransactionList`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `data` (Transaction[], obrigatório)
  - `id` (string · uuid, obrigatório)
  - `account_id` (string · uuid, obrigatório)
  - `customer_id` (string · uuid, obrigatório)
  - `type` (string, obrigatório): Um de: `pix`, `ted`, `boleto`, `internal`.
  - `direction` (string, obrigatório): Um de: `inbound`, `outbound`.
  - `status` (string, obrigatório): `pending_provider` is neither success nor failure: the transaction is settling at the provider. Um de: `created`, `pending_provider`, `settled`, `failed`, `returned`.
  - `channel` (string, obrigatório)
  - `amount_cents` (string, obrigatório): Valor em centavos.
  - `fee_cents` (string, obrigatório): Valor em centavos.
  - `description` (string · null, obrigatório)
  - `counterparty` (Counterparty, obrigatório): A contraparte da transação. Chave e documento SEMPRE chegam mascarados.
    - `key` (string · null, obrigatório): Chave mascarada, por exemplo `jo***@example.com`.
    - `key_type` (string · null, obrigatório)
    - `name` (string · null, obrigatório)
    - `document` (string · null, obrigatório): Documento mascarado, por exemplo `***.456.789-**`.
    - `bank_ispb` (string · null, obrigatório)
    - `account_id` (string · uuid · null, obrigatório): Preenchido numa transferência interna.
  - `provider_ref` (string · null, obrigatório)
  - `end_to_end_id` (string · null, obrigatório)
  - `funds_held` (boolean, obrigatório): Valor em bloqueio cautelar, aguardando decisão da instituição.
  - `held_cents` (string, obrigatório): Valor em centavos.
  - `failure_reason` (string · null, obrigatório)
  - `compliance_decision` (string · null, obrigatório)
  - `metadata` (object, obrigatório)
  - `requested_at` (string · date-time, obrigatório)
  - `settled_at` (string · date-time · null, obrigatório)
  - `failed_at` (string · date-time · null, obrigatório)
  - `returned_at` (string · date-time · null, obrigatório)
- `total` (integer, obrigatório)

Exemplo:

```bash
curl "https://api.ingot.com.br/transactions?account_id=$ACCOUNT_ID" \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "data": [
    {
      "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "type": "pix",
      "direction": "inbound",
      "status": "created",
      "channel": "string",
      "amount_cents": "15990",
      "fee_cents": "15990",
      "description": "string",
      "counterparty": {
        "key": "string",
        "key_type": "string",
        "name": "string",
        "document": "string",
        "bank_ispb": "string",
        "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f"
      },
      "provider_ref": "string",
      "end_to_end_id": "string",
      "funds_held": false,
      "held_cents": "15990",
      "failure_reason": "string",
      "compliance_decision": "string",
      "metadata": {},
      "requested_at": "2026-11-19T18:00:00.000Z",
      "settled_at": "2026-11-19T18:00:00.000Z",
      "failed_at": "2026-11-19T18:00:00.000Z",
      "returned_at": "2026-11-19T18:00:00.000Z"
    }
  ],
  "total": 1
}
```

### Consultar uma transação

`GET /transactions/{id}` · escopo `transactions:read` · até 25 requisições por segundo

Lê uma transação.

Parâmetros de caminho:

- `id` (string · uuid, obrigatório)

Resposta `200`: um objeto `Transaction`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `id` (string · uuid, obrigatório)
- `account_id` (string · uuid, obrigatório)
- `customer_id` (string · uuid, obrigatório)
- `type` (string, obrigatório): Um de: `pix`, `ted`, `boleto`, `internal`.
- `direction` (string, obrigatório): Um de: `inbound`, `outbound`.
- `status` (string, obrigatório): `pending_provider` is neither success nor failure: the transaction is settling at the provider. Um de: `created`, `pending_provider`, `settled`, `failed`, `returned`.
- `channel` (string, obrigatório)
- `amount_cents` (string, obrigatório): Valor em centavos.
- `fee_cents` (string, obrigatório): Valor em centavos.
- `description` (string · null, obrigatório)
- `counterparty` (Counterparty, obrigatório): A contraparte da transação. Chave e documento SEMPRE chegam mascarados.
  - `key` (string · null, obrigatório): Chave mascarada, por exemplo `jo***@example.com`.
  - `key_type` (string · null, obrigatório)
  - `name` (string · null, obrigatório)
  - `document` (string · null, obrigatório): Documento mascarado, por exemplo `***.456.789-**`.
  - `bank_ispb` (string · null, obrigatório)
  - `account_id` (string · uuid · null, obrigatório): Preenchido numa transferência interna.
- `provider_ref` (string · null, obrigatório)
- `end_to_end_id` (string · null, obrigatório)
- `funds_held` (boolean, obrigatório): Valor em bloqueio cautelar, aguardando decisão da instituição.
- `held_cents` (string, obrigatório): Valor em centavos.
- `failure_reason` (string · null, obrigatório)
- `compliance_decision` (string · null, obrigatório)
- `metadata` (object, obrigatório)
- `requested_at` (string · date-time, obrigatório)
- `settled_at` (string · date-time · null, obrigatório)
- `failed_at` (string · date-time · null, obrigatório)
- `returned_at` (string · date-time · null, obrigatório)

Exemplo:

```bash
curl https://api.ingot.com.br/transactions/$ID \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "type": "pix",
  "direction": "inbound",
  "status": "created",
  "channel": "string",
  "amount_cents": "15990",
  "fee_cents": "15990",
  "description": "string",
  "counterparty": {
    "key": "string",
    "key_type": "string",
    "name": "string",
    "document": "string",
    "bank_ispb": "string",
    "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f"
  },
  "provider_ref": "string",
  "end_to_end_id": "string",
  "funds_held": false,
  "held_cents": "15990",
  "failure_reason": "string",
  "compliance_decision": "string",
  "metadata": {},
  "requested_at": "2026-11-19T18:00:00.000Z",
  "settled_at": "2026-11-19T18:00:00.000Z",
  "failed_at": "2026-11-19T18:00:00.000Z",
  "returned_at": "2026-11-19T18:00:00.000Z"
}
```

### Histórico de estados

`GET /transactions/{id}/history` · escopo `transactions:read` · até 25 requisições por segundo

Cada mudança de estado da transação, em ordem.

Parâmetros de caminho:

- `id` (string · uuid, obrigatório)

Resposta `200`: um objeto `TransactionHistory`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `data` (TransactionStatusChange[], obrigatório)
  - `from_status` (any, obrigatório)
  - `to_status` (string, obrigatório): Um de: `created`, `pending_provider`, `settled`, `failed`, `returned`.
  - `reason` (string · null, obrigatório)
  - `actor_kind` (string, obrigatório)
  - `actor_id` (string, obrigatório)
  - `created_at` (string · date-time, obrigatório)

Exemplo:

```bash
curl https://api.ingot.com.br/transactions/$ID/history \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "data": [
    {
      "from_status": "string",
      "to_status": "created",
      "reason": "string",
      "actor_kind": "string",
      "actor_id": "string",
      "created_at": "2026-11-19T18:00:00.000Z"
    }
  ]
}
```

## Webhooks

Os endpoints que recebem os eventos da sua conta, assinados com HMAC-SHA256.

### Cadastrar um endpoint

`POST /webhooks/endpoints` · escopo `webhooks:manage` · até 25 requisições por segundo

Cadastra um endpoint HTTPS. O secret volta uma única vez. Com a chave da instituição, sem customer_id, o endpoint é da instituição e só assina os eventos de onboarding.

Corpo da requisição (JSON):

- `customer_id` (string · uuid)
- `url` (string, obrigatório)
- `events` (string[], obrigatório)
- `description` (string)

Resposta `201`: um objeto `CreatedWebhookEndpoint`. Erros: `401`, `403`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `id` (string · uuid, obrigatório)
- `customer_id` (string · uuid · null, obrigatório): Null for an endpoint of the institution itself.
- `url` (string, obrigatório)
- `events` (string[], obrigatório)
- `status` (string, obrigatório): Um de: `active`, `disabled`.
- `created_at` (string · date-time, obrigatório)
- `secret` (string, obrigatório): Mostrado uma única vez.
- `notice` (string, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/webhooks/endpoints \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
    "url": "https://sua-empresa.com.br/webhooks/core",
    "events": [
      "string"
    ],
    "description": "string"
  }'
```

```json
{
  "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "url": "https://sua-empresa.com.br/webhooks/core",
  "events": [
    "string"
  ],
  "status": "active",
  "created_at": "2026-11-19T18:00:00.000Z",
  "secret": "string",
  "notice": "string"
}
```

### Listar endpoints

`GET /webhooks/endpoints` · escopo `webhooks:manage` · até 25 requisições por segundo

Lista os endpoints da empresa, ou os da instituição quando chamado sem customer_id com a chave da instituição.

Parâmetros de consulta:

- `customer_id` (string · uuid)
- `owner` (string): Um de: `all`.

Resposta `200`: um objeto `WebhookEndpointList`. Erros: `401`, `403`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `data` (WebhookEndpoint[], obrigatório)
  - `id` (string · uuid, obrigatório)
  - `customer_id` (string · uuid · null, obrigatório): The company it belongs to; null for the institution itself.
  - `owner_name` (string · null, obrigatório): The company's name, for the backoffice; null for the institution.
  - `url` (string, obrigatório)
  - `events` (string[], obrigatório)
  - `status` (string, obrigatório): Um de: `active`, `disabled`.
  - `description` (string · null, obrigatório)
  - `created_at` (string · date-time, obrigatório)

Exemplo:

```bash
curl "https://api.ingot.com.br/webhooks/endpoints?customer_id=$CUSTOMER_ID" \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "data": [
    {
      "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "owner_name": "string",
      "url": "https://sua-empresa.com.br/webhooks/core",
      "events": [
        "string"
      ],
      "status": "active",
      "description": "string",
      "created_at": "2026-11-19T18:00:00.000Z"
    }
  ]
}
```

### Desativar um endpoint

`DELETE /webhooks/endpoints/{id}` · escopo `webhooks:manage` · até 25 requisições por segundo

Desativa um endpoint. O que ainda estava na fila para ele é cancelado e não pode ser reenviado.

Parâmetros de caminho:

- `id` (string · uuid, obrigatório)

Resposta `204`: sem corpo. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

Exemplo:

```bash
curl -X DELETE https://api.ingot.com.br/webhooks/endpoints/$ID \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

### Listar entregas

`GET /webhooks/deliveries` · escopo `webhooks:manage` · até 25 requisições por segundo

As entregas dos seus endpoints, das mais novas para as mais antigas: o que foi enviado, a tentativa, a última resposta e o erro. Filtre por status (dead, retrying, delivered, pending), endpoint_id, event_type ou event_id (as entregas de um evento), e pagine por cursor. O duration_ms diz quanto o seu endpoint levou para responder na última tentativa.

Parâmetros de consulta:

- `endpoint_id` (string · uuid)
- `status` (string): Um de: `pending`, `retrying`, `delivered`, `dead`.
- `event_type` (string): De 1 a 80 caracteres.
- `event_id` (string · uuid): One event's deliveries: the `event_id` of the body.
- `limit` (integer): De `1` a `100`.
- `cursor` (string)

Resposta `200`: um objeto `WebhookDeliveryPage`. Erros: `401`, `403`, `404`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `data` (WebhookDelivery[], obrigatório)
  - `id` (string · uuid, obrigatório)
  - `endpoint_id` (string · uuid, obrigatório)
  - `endpoint_url` (string, obrigatório)
  - `endpoint_status` (string, obrigatório): Um de: `active`, `disabled`.
  - `customer_id` (string · uuid · null, obrigatório): The company that owns the endpoint; null for the institution.
  - `owner_name` (string · null, obrigatório): The company's name; null for the institution.
  - `event_id` (string · uuid, obrigatório): The same on every attempt and every resend: discard duplicates by it.
  - `event_type` (string, obrigatório)
  - `status` (string, obrigatório): Um de: `pending`, `delivered`, `failed`, `dead`.
  - `attempts` (integer, obrigatório): Attempts in the current round; a resend starts a new one.
  - `max_attempts` (integer, obrigatório): Attempts a round gets before the delivery is `dead`.
  - `response_status` (integer · null, obrigatório): HTTP status of the last attempt; null when nobody answered (timeout, connection refused).
  - `last_error` (string · null, obrigatório)
  - `created_at` (string · date-time, obrigatório)
  - `last_attempt_at` (string · date-time · null, obrigatório)
  - `next_attempt_at` (string · date-time · null, obrigatório): When it goes out next; null unless `pending`.
  - `delivered_at` (string · date-time · null, obrigatório)
  - `resend_count` (integer, obrigatório): How many times it was sent again by hand.
  - `last_resent_at` (string · date-time · null, obrigatório)
  - `duration_ms` (integer · null, obrigatório): How long the endpoint took on the last attempt (a timeout reads about 10000); null before the first.
  - `payload` (object, obrigatório): The `data` of the body sent: already masked, no personal data in the clear.
- `next_cursor` (string · null, obrigatório): Pass as `cursor` for the next page; null at the end.
- `attention` (WebhookDeliveryAttention, obrigatório): Over every endpoint listed, not only this page. Capped at 1000.
  - `dead` (integer, obrigatório): Ran out of attempts.
  - `retrying` (integer, obrigatório): Pending after at least one failed attempt.

Exemplo:

```bash
curl https://api.ingot.com.br/webhooks/deliveries \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "data": [
    {
      "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "endpoint_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "endpoint_url": "string",
      "endpoint_status": "active",
      "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "owner_name": "string",
      "event_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "event_type": "string",
      "status": "pending",
      "attempts": 1,
      "max_attempts": 1,
      "response_status": 1,
      "last_error": "string",
      "created_at": "2026-11-19T18:00:00.000Z",
      "last_attempt_at": "2026-11-19T18:00:00.000Z",
      "next_attempt_at": "2026-11-19T18:00:00.000Z",
      "delivered_at": "2026-11-19T18:00:00.000Z",
      "resend_count": 1,
      "last_resent_at": "2026-11-19T18:00:00.000Z",
      "duration_ms": 1,
      "payload": {}
    }
  ],
  "next_cursor": "string",
  "attention": {
    "dead": 1,
    "retrying": 1
  }
}
```

### Reenviar uma entrega

`POST /webhooks/deliveries/{id}/resend` · escopo `webhooks:manage` · até 25 requisições por segundo

Põe a entrega na fila de novo, com o mesmo event_id e o mesmo corpo, e as tentativas recomeçam. Se ela já estava para sair, nada muda (queued: false).

Parâmetros de caminho:

- `id` (string · uuid, obrigatório)

Resposta `202`: um objeto `WebhookDeliveryResent`. Erros: `401`, `403`, `404`, `409`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `queued` (boolean, obrigatório): False when it was already due: nothing was queued twice.
- `delivery` (WebhookDelivery, obrigatório): One event for one endpoint. `pending` is queued (with `attempts` above 0, retrying), `delivered` got a 2xx, `dead` ran out of attempts or its endpoint was deactivated (`last_error` says which). `failed` is not used any more and only appears on old rows.
  - `id` (string · uuid, obrigatório)
  - `endpoint_id` (string · uuid, obrigatório)
  - `endpoint_url` (string, obrigatório)
  - `endpoint_status` (string, obrigatório): Um de: `active`, `disabled`.
  - `customer_id` (string · uuid · null, obrigatório): The company that owns the endpoint; null for the institution.
  - `owner_name` (string · null, obrigatório): The company's name; null for the institution.
  - `event_id` (string · uuid, obrigatório): The same on every attempt and every resend: discard duplicates by it.
  - `event_type` (string, obrigatório)
  - `status` (string, obrigatório): Um de: `pending`, `delivered`, `failed`, `dead`.
  - `attempts` (integer, obrigatório): Attempts in the current round; a resend starts a new one.
  - `max_attempts` (integer, obrigatório): Attempts a round gets before the delivery is `dead`.
  - `response_status` (integer · null, obrigatório): HTTP status of the last attempt; null when nobody answered (timeout, connection refused).
  - `last_error` (string · null, obrigatório)
  - `created_at` (string · date-time, obrigatório)
  - `last_attempt_at` (string · date-time · null, obrigatório)
  - `next_attempt_at` (string · date-time · null, obrigatório): When it goes out next; null unless `pending`.
  - `delivered_at` (string · date-time · null, obrigatório)
  - `resend_count` (integer, obrigatório): How many times it was sent again by hand.
  - `last_resent_at` (string · date-time · null, obrigatório)
  - `duration_ms` (integer · null, obrigatório): How long the endpoint took on the last attempt (a timeout reads about 10000); null before the first.
  - `payload` (object, obrigatório): The `data` of the body sent: already masked, no personal data in the clear.

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/webhooks/deliveries/$ID/resend \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "queued": false,
  "delivery": {
    "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
    "endpoint_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
    "endpoint_url": "string",
    "endpoint_status": "active",
    "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
    "owner_name": "string",
    "event_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
    "event_type": "string",
    "status": "pending",
    "attempts": 1,
    "max_attempts": 1,
    "response_status": 1,
    "last_error": "string",
    "created_at": "2026-11-19T18:00:00.000Z",
    "last_attempt_at": "2026-11-19T18:00:00.000Z",
    "next_attempt_at": "2026-11-19T18:00:00.000Z",
    "delivered_at": "2026-11-19T18:00:00.000Z",
    "resend_count": 1,
    "last_resent_at": "2026-11-19T18:00:00.000Z",
    "duration_ms": 1,
    "payload": {}
  }
}
```

### Reenviar as que falharam

`POST /webhooks/endpoints/{id}/resend-failed` · escopo `webhooks:manage` · até 25 requisições por segundo

Reenvia de uma vez as entregas de um endpoint que esgotaram as tentativas, das mais antigas para as mais novas, até 500 por chamada (more: true quando sobram).

Parâmetros de caminho:

- `id` (string · uuid, obrigatório)

Resposta `202`: um objeto `WebhookDeliveriesResent`. Erros: `401`, `403`, `404`, `409`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `queued` (integer, obrigatório): Deliveries put back in the queue by this call.
- `more` (boolean, obrigatório): Others are still `dead`: call again.

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/webhooks/endpoints/$ID/resend-failed \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "queued": 1,
  "more": false
}
```

## Onboarding de empresas

Para a instituição parceira que tem sistema próprio: cadastra as empresas dos clientes, envia os documentos e acompanha o onboarding de cada uma no provedor, até a conta abrir. Só com a chave da instituição.

### Cadastrar uma empresa

`POST /onboarding/companies` · escopo `onboarding:write` · até 25 requisições por segundo

Cadastra a empresa e o representante, abre a conta de pagamento e registra o aceite dos termos do provedor. Nada vai ao provedor antes do KYC aprovar a empresa. Repetir com o mesmo CNPJ e o mesmo representante devolve 200 com a situação atual.

Corpo da requisição (JSON):

- `document` (string, obrigatório): CNPJ. De 14 a 18 caracteres.
- `legal_name` (string, obrigatório): De 3 a 160 caracteres.
- `trade_name` (string)
- `founded_on` (string · date)
- `monthly_revenue_cents` (integer, obrigatório): The company's monthly revenue, in cents. Mínimo `1`.
- `average_ticket_cents` (integer, obrigatório): The company's average ticket, in cents. De `1` a `100000000000`.
- `representative` (object, obrigatório)
  - `document` (string, obrigatório): CPF. De 11 a 14 caracteres.
  - `name` (string, obrigatório): De 3 a 160 caracteres.
  - `email` (string · email, obrigatório)
  - `phone` (string, obrigatório): De 10 a 20 caracteres.
  - `birth_date` (string · date)
  - `pep` (boolean, obrigatório): Whether the person is politically exposed.
  - `role` (string, obrigatório): Um de: `partner`, `representative`.
- `consent` (object, obrigatório)
  - `terms_accepted` (boolean, obrigatório): Um de: `true`.
  - `ip_address` (string, obrigatório): De 3 a 45 caracteres.

Resposta `200`: um objeto `CompanyOnboarding`. Erros: `401`, `403`, `404`, `409`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `customer_id` (string · uuid, obrigatório)
- `account_id` (string · uuid · null, obrigatório)
- `legal_name` (string, obrigatório)
- `trade_name` (string · null, obrigatório)
- `document` (string, obrigatório): Masked.
- `kyc_status` (string, obrigatório): Um de: `pending`, `under_review`, `approved`, `rejected`.
- `status` (string, obrigatório): Um de: `active`, `inactive`, `blocked`, `closed`.
- `account_status` (string · null, obrigatório): `pending_kyc`, `active`, `blocked` or `closed`.
- `representative` (any, obrigatório)
- `opening` (any, obrigatório)
- `documents` (CompanyOnboardingDocument[], obrigatório)
  - `id` (string · uuid, obrigatório)
  - `owner` (string, obrigatório): Um de: `company`, `representative`.
  - `kind` (string, obrigatório)
  - `filename` (string, obrigatório)
  - `content_type` (string, obrigatório)
  - `size_bytes` (integer, obrigatório)
  - `uploaded_at` (string · date-time, obrigatório)
- `created_at` (string · date-time, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/onboarding/companies \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document": "string",
    "legal_name": "string",
    "trade_name": "string",
    "founded_on": "2026-11-19",
    "monthly_revenue_cents": 15990,
    "average_ticket_cents": 15990,
    "representative": {
      "document": "string",
      "name": "string",
      "email": "financeiro@sua-empresa.com.br",
      "phone": "string",
      "birth_date": "2026-11-19",
      "pep": false,
      "role": "partner"
    },
    "consent": {
      "terms_accepted": true,
      "ip_address": "string"
    }
  }'
```

```json
{
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "legal_name": "string",
  "trade_name": "string",
  "document": "string",
  "kyc_status": "pending",
  "status": "active",
  "account_status": "string",
  "representative": "string",
  "opening": "string",
  "documents": [
    {
      "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "owner": "company",
      "kind": "string",
      "filename": "string",
      "content_type": "string",
      "size_bytes": 1,
      "uploaded_at": "2026-11-19T18:00:00.000Z"
    }
  ],
  "created_at": "2026-11-19T18:00:00.000Z"
}
```

### Enviar um documento

`POST /onboarding/companies/{customerId}/documents` · escopo `onboarding:write` · até 25 requisições por segundo

Envia um documento da empresa ou do representante, em base64 (em PDF), até 2 MB.

Parâmetros de caminho:

- `customerId` (string · uuid, obrigatório)

Corpo da requisição (JSON):

- `owner` (string, obrigatório): Um de: `company`, `representative`.
- `kind` (string, obrigatório): Um de: `articles_of_incorporation`, `income_statement`, `power_of_attorney`, `proof_of_address`, `other`, `identity_front`, `identity_back`, `selfie`.
- `filename` (string, obrigatório): De 1 a 200 caracteres.
- `content_type` (string, obrigatório): De 3 a 100 caracteres.
- `content_base64` (string, obrigatório)

Resposta `201`: um objeto `CompanyOnboardingDocument`. Erros: `401`, `403`, `404`, `409`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `id` (string · uuid, obrigatório)
- `owner` (string, obrigatório): Um de: `company`, `representative`.
- `kind` (string, obrigatório)
- `filename` (string, obrigatório)
- `content_type` (string, obrigatório)
- `size_bytes` (integer, obrigatório)
- `uploaded_at` (string · date-time, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/onboarding/companies/$CUSTOMERID/documents \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "owner": "company",
    "kind": "articles_of_incorporation",
    "filename": "string",
    "content_type": "string",
    "content_base64": "string"
  }'
```

```json
{
  "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "owner": "company",
  "kind": "string",
  "filename": "string",
  "content_type": "string",
  "size_bytes": 1,
  "uploaded_at": "2026-11-19T18:00:00.000Z"
}
```

### Acompanhar uma empresa

`GET /onboarding/companies/{customerId}` · escopo `onboarding:read` · até 25 requisições por segundo

KYC da empresa e do representante, conta, documentos e a etapa do onboarding no provedor, com o link da prova de vida enquanto ele estiver aberto.

Parâmetros de caminho:

- `customerId` (string · uuid, obrigatório)

Resposta `200`: um objeto `CompanyOnboarding`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `customer_id` (string · uuid, obrigatório)
- `account_id` (string · uuid · null, obrigatório)
- `legal_name` (string, obrigatório)
- `trade_name` (string · null, obrigatório)
- `document` (string, obrigatório): Masked.
- `kyc_status` (string, obrigatório): Um de: `pending`, `under_review`, `approved`, `rejected`.
- `status` (string, obrigatório): Um de: `active`, `inactive`, `blocked`, `closed`.
- `account_status` (string · null, obrigatório): `pending_kyc`, `active`, `blocked` or `closed`.
- `representative` (any, obrigatório)
- `opening` (any, obrigatório)
- `documents` (CompanyOnboardingDocument[], obrigatório)
  - `id` (string · uuid, obrigatório)
  - `owner` (string, obrigatório): Um de: `company`, `representative`.
  - `kind` (string, obrigatório)
  - `filename` (string, obrigatório)
  - `content_type` (string, obrigatório)
  - `size_bytes` (integer, obrigatório)
  - `uploaded_at` (string · date-time, obrigatório)
- `created_at` (string · date-time, obrigatório)

Exemplo:

```bash
curl https://api.ingot.com.br/onboarding/companies/$CUSTOMERID \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "legal_name": "string",
  "trade_name": "string",
  "document": "string",
  "kyc_status": "pending",
  "status": "active",
  "account_status": "string",
  "representative": "string",
  "opening": "string",
  "documents": [
    {
      "id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "owner": "company",
      "kind": "string",
      "filename": "string",
      "content_type": "string",
      "size_bytes": 1,
      "uploaded_at": "2026-11-19T18:00:00.000Z"
    }
  ],
  "created_at": "2026-11-19T18:00:00.000Z"
}
```

### Listar as empresas

`GET /onboarding/companies` · escopo `onboarding:read` · até 25 requisições por segundo

As empresas da instituição, com a etapa do onboarding de cada uma. Paginado por limit e offset.

Parâmetros de consulta:

- `kyc_status` (string): Um de: `pending`, `under_review`, `approved`, `rejected`.
- `limit` (integer): De `1` a `100`.
- `offset` (integer): Mínimo `0`.

Resposta `200`: um objeto `CompanyOnboardingList`. Erros: `401`, `403`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `data` (CompanyOnboardingSummary[], obrigatório)
  - `customer_id` (string · uuid, obrigatório)
  - `account_id` (string · uuid · null, obrigatório)
  - `legal_name` (string, obrigatório)
  - `document` (string, obrigatório): Masked.
  - `kyc_status` (string, obrigatório): Um de: `pending`, `under_review`, `approved`, `rejected`.
  - `account_status` (string · null, obrigatório): `pending_kyc`, `active`, `blocked` or `closed`.
  - `opening_status` (string · null, obrigatório): The status of the opening at the provider, if any.
  - `created_at` (string · date-time, obrigatório)
- `total` (integer, obrigatório)

Exemplo:

```bash
curl https://api.ingot.com.br/onboarding/companies \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "data": [
    {
      "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "legal_name": "string",
      "document": "string",
      "kyc_status": "pending",
      "account_status": "string",
      "opening_status": "string",
      "created_at": "2026-11-19T18:00:00.000Z"
    }
  ],
  "total": 1
}
```

### Abrir uma conta adicional da empresa

`POST /onboarding/companies/{customerId}/accounts` · escopo `onboarding:write` · até 25 requisições por segundo

Abre mais uma conta para a mesma empresa (o mesmo CNPJ), separada da principal, com saldo e extrato próprios. A empresa precisa estar aprovada, com a conta principal ativa. A conta nova movimenta quando provider_status chega a linked, em poucos segundos. Repetir com o mesmo nome devolve 200 com a mesma conta. Até 10 contas adicionais por empresa.

Parâmetros de caminho:

- `customerId` (string · uuid, obrigatório)

Corpo da requisição (JSON):

- `label` (string, obrigatório): O nome da conta adicional ("Projeto Centro"), que não pode se repetir entre as contas abertas da empresa. De 2 a 60 caracteres.

Resposta `200`: um objeto `HolderAccount`. Erros: `400`, `401`, `403`, `404`, `409`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `account_id` (string · uuid, obrigatório)
- `customer_id` (string · uuid, obrigatório)
- `main_account_id` (string · uuid · null, obrigatório)
- `label` (string · null, obrigatório)
- `branch` (string, obrigatório)
- `number` (string, obrigatório)
- `check_digit` (string, obrigatório)
- `display` (string, obrigatório)
- `status` (string, obrigatório): Um de: `pending_kyc`, `active`, `blocked`, `closed`.
- `provider_status` (string, obrigatório): Um de: `linked`, `not_needed`, `not_requested`, `requested`, `waiting_kyc`, `waiting_holder_data`, `in_progress`, `submitted`, `completed`, `failed`.
- `provider_failure_reason` (string · null, obrigatório)
- `available_cents` (string · null, obrigatório): Only on the dashboard list of the institution.
- `opened_at` (string · date-time, obrigatório)
- `activated_at` (string · date-time · null, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/onboarding/companies/$CUSTOMERID/accounts \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "Projeto Centro"
  }'
```

```json
{
  "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "main_account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
  "label": "Projeto Centro",
  "branch": "string",
  "number": "string",
  "check_digit": "string",
  "display": "string",
  "status": "pending_kyc",
  "provider_status": "linked",
  "provider_failure_reason": "string",
  "available_cents": "15990",
  "opened_at": "2026-11-19T18:00:00.000Z",
  "activated_at": "2026-11-19T18:00:00.000Z"
}
```

### Listar as contas da empresa

`GET /onboarding/companies/{customerId}/accounts` · escopo `onboarding:read` · até 25 requisições por segundo

A conta principal e as adicionais da empresa, com o provider_status de cada uma.

Parâmetros de caminho:

- `customerId` (string · uuid, obrigatório)

Resposta `200`: um objeto `HolderAccountList`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `data` (HolderAccount[], obrigatório)
  - `account_id` (string · uuid, obrigatório)
  - `customer_id` (string · uuid, obrigatório)
  - `main_account_id` (string · uuid · null, obrigatório)
  - `label` (string · null, obrigatório)
  - `branch` (string, obrigatório)
  - `number` (string, obrigatório)
  - `check_digit` (string, obrigatório)
  - `display` (string, obrigatório)
  - `status` (string, obrigatório): Um de: `pending_kyc`, `active`, `blocked`, `closed`.
  - `provider_status` (string, obrigatório): Um de: `linked`, `not_needed`, `not_requested`, `requested`, `waiting_kyc`, `waiting_holder_data`, `in_progress`, `submitted`, `completed`, `failed`.
  - `provider_failure_reason` (string · null, obrigatório)
  - `available_cents` (string · null, obrigatório): Only on the dashboard list of the institution.
  - `opened_at` (string · date-time, obrigatório)
  - `activated_at` (string · date-time · null, obrigatório)

Exemplo:

```bash
curl https://api.ingot.com.br/onboarding/companies/$CUSTOMERID/accounts \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "data": [
    {
      "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "customer_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "main_account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
      "label": "Projeto Centro",
      "branch": "string",
      "number": "string",
      "check_digit": "string",
      "display": "string",
      "status": "pending_kyc",
      "provider_status": "linked",
      "provider_failure_reason": "string",
      "available_cents": "15990",
      "opened_at": "2026-11-19T18:00:00.000Z",
      "activated_at": "2026-11-19T18:00:00.000Z"
    }
  ]
}
```

## Chave

Para conferir qual chave está em uso e quais escopos ela tem.

### Identificar a chave

`GET /auth/me` · até 25 requisições por segundo

Devolve o tipo, o id, o nome e os escopos de quem está autenticado. Útil para validar a chave na subida da integração.

Resposta `200`: um objeto `Principal`. Erros: `401`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `kind` (string, obrigatório): Um de: `customer`, `backoffice`, `api_key`, `system`, `provider`.
- `id` (string, obrigatório)
- `label` (string, obrigatório)
- `permissions` (string[], obrigatório)
- `mfa_verified` (boolean, obrigatório)
- `available_roles` (string[], obrigatório)

Exemplo:

```bash
curl https://api.ingot.com.br/auth/me \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "kind": "customer",
  "id": "string",
  "label": "Projeto Centro",
  "permissions": [
    "string"
  ],
  "mfa_verified": false,
  "available_roles": [
    "string"
  ]
}
```

## Sandbox

Só com uma chave ck_test_, no sandbox: o lado de fora de um pagamento, que em produção é o pagador ou o provedor. Com uma chave de produção, 404.

### Simular um Pix recebido

`POST /sandbox/pix/inbound` · escopo `transactions:write` · até 5 requisições por segundo

Alguém manda um Pix para uma conta da sua empresa. O webhook sai antes da resposta.

Corpo da requisição (JSON):

- `account_id` (string · uuid, obrigatório)
- `amount_cents` (integer, obrigatório): Valor em centavos, inteiro, sem casas decimais. Mínimo `1`.
- `counterparty_key` (string, obrigatório)
- `counterparty_name` (string)
- `counterparty_document` (string)

Resposta `202`: um objeto `SandboxInboundPix`. Erros: `401`, `403`, `404`, `422`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `provider_ref` (string, obrigatório)
- `end_to_end_id` (string, obrigatório)
- `delivered_webhooks` (integer, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/sandbox/pix/inbound \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "7f0c1d2e-5b8a-4c3d-9e1f-2a3b4c5d6e7f",
    "amount_cents": 15990,
    "counterparty_key": "string",
    "counterparty_name": "string",
    "counterparty_document": "string"
  }'
```

```json
{
  "provider_ref": "string",
  "end_to_end_id": "string",
  "delivered_webhooks": 1
}
```

### Simular o pagamento de um QR Code

`POST /sandbox/pix/charges/{providerRef}/pay` · escopo `transactions:write` · até 5 requisições por segundo

O pagador paga o QR Code. Sem corpo, paga o valor do código.

Parâmetros de caminho:

- `providerRef` (string, obrigatório)

Corpo da requisição (JSON):

- `amount_cents` (integer): Valor em centavos, inteiro, sem casas decimais. Mínimo `1`.

Resposta `202`: um objeto `SandboxInboundPix`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `provider_ref` (string, obrigatório)
- `end_to_end_id` (string, obrigatório)
- `delivered_webhooks` (integer, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/sandbox/pix/charges/$PROVIDERREF/pay \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount_cents": 15990
  }'
```

```json
{
  "provider_ref": "string",
  "end_to_end_id": "string",
  "delivered_webhooks": 1
}
```

### Simular o pagamento dos splits

`POST /sandbox/pix/charges/{providerRef}/pay-splits` · escopo `transactions:write` · até 5 requisições por segundo

O provedor paga os splits de um QR Code já pago, como faz à meia-noite.

Parâmetros de caminho:

- `providerRef` (string, obrigatório)

Resposta `200`: object. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `paid` (integer, obrigatório)
- `booked` (integer, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/sandbox/pix/charges/$PROVIDERREF/pay-splits \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "paid": 1,
  "booked": 1
}
```

### Simular o pagamento de um boleto

`POST /sandbox/boleto/{providerRef}/pay` · escopo `transactions:write` · até 5 requisições por segundo

O pagador paga um boleto emitido.

Parâmetros de caminho:

- `providerRef` (string, obrigatório)

Resposta `202`: um objeto `SandboxAck`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `delivered_webhooks` (integer, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/sandbox/boleto/$PROVIDERREF/pay \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "delivered_webhooks": 1
}
```

### Simular a autorização de uma assinatura

`POST /sandbox/pix/subscriptions/{providerRef}/authorize` · escopo `transactions:write` · até 5 requisições por segundo

O pagador autoriza a assinatura Pix (e paga a primeira cobrança, quando houver).

Parâmetros de caminho:

- `providerRef` (string, obrigatório)

Resposta `202`: um objeto `SandboxAck`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `delivered_webhooks` (integer, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/sandbox/pix/subscriptions/$PROVIDERREF/authorize \
  -H "Authorization: ApiKey $CORE_API_KEY"
```

```json
{
  "delivered_webhooks": 1
}
```

### Simular a cobrança de um período

`POST /sandbox/pix/subscriptions/{providerRef}/charge` · escopo `transactions:write` · até 5 requisições por segundo

O provedor cobra um período da assinatura: paid ou failed.

Parâmetros de caminho:

- `providerRef` (string, obrigatório)

Corpo da requisição (JSON):

- `outcome` (string): Um de: `paid`, `failed`.

Resposta `202`: um objeto `SandboxAck`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `delivered_webhooks` (integer, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/sandbox/pix/subscriptions/$PROVIDERREF/charge \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "outcome": "paid"
  }'
```

```json
{
  "delivered_webhooks": 1
}
```

### Simular o fim de uma assinatura

`POST /sandbox/pix/subscriptions/{providerRef}/end` · escopo `transactions:write` · até 5 requisições por segundo

A assinatura termina pelo lado do pagador ou do provedor.

Parâmetros de caminho:

- `providerRef` (string, obrigatório)

Corpo da requisição (JSON):

- `status` (string, obrigatório): Um de: `cancelled`, `rejected`, `expired`.

Resposta `202`: um objeto `SandboxAck`. Erros: `401`, `403`, `404`, `429`, no formato padrão (https://docs.ingot.com.br/erros.md).

- `delivered_webhooks` (integer, obrigatório)

Exemplo:

```bash
curl -X POST https://api.ingot.com.br/sandbox/pix/subscriptions/$PROVIDERREF/end \
  -H "Authorization: ApiKey $CORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "cancelled"
  }'
```

```json
{
  "delivered_webhooks": 1
}
```

## Saúde

Para o seu monitoramento saber se a API está no ar.

### Verificar a saúde

`GET /health`

Responde enquanto o processo está de pé. Não exige chave.

Resposta `200`: sem corpo.

Exemplo:

```bash
curl https://api.ingot.com.br/health
```
