> For the complete documentation index, see [llms.txt](https://docs.barte.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.barte.com/banking/api/webhooks/webhooks-v2.md).

# Eventos de Conta v2

Formato enriquecido de notificação de status de conta. Inclui detalhamento por sócio (`entities`) e suporte ao novo status `BIOMETRIC_REJECTED`.

Para receber este formato, cadastre um webhook com `eventType: account_holder_status.update`.

## Status da Conta

| Status               | Descrição                                                      | Ação recomendada                 |
| -------------------- | -------------------------------------------------------------- | -------------------------------- |
| `KYC_APPROVED`       | KYC aprovado                                                   | Chamar `POST /activate` (PAYFAC) |
| `KYC_REPROVED`       | Dados do KYC rejeitados (ex: nome divergente, sócios ausentes) | Corrigir dados via `PUT`         |
| `BIOMETRIC_REJECTED` | Verificação biométrica rejeitada (ex: selfie não reconhecida)  | Solicitar nova sessão biométrica |

## Estrutura do Payload

| Campo                          | Tipo              | Descrição                                                                                                |
| ------------------------------ | ----------------- | -------------------------------------------------------------------------------------------------------- |
| `event`                        | String            | Tipo específico do evento (`account.kyc.approved`, `account.kyc.reproved`, `account.biometric.rejected`) |
| `processedAt`                  | String (ISO 8601) | Data e hora do processamento                                                                             |
| `data.accountId`               | String (UUID)     | ID interno da conta                                                                                      |
| `data.accountType`             | String            | Tipo da conta (`business`)                                                                               |
| `data.status`                  | String            | Status resultante (`KYC_APPROVED`, `KYC_REPROVED`, `BIOMETRIC_REJECTED`)                                 |
| `data.reasons`                 | Array\<String>    | Códigos de motivo das análises reprovadas                                                                |
| `data.entities`                | Array\<Object>    | Detalhamento por sócio — presente apenas quando há reprovações                                           |
| `data.entities[].document`     | String            | CPF do sócio                                                                                             |
| `data.entities[].analysisType` | String            | Tipo de análise que reprovou (`kyc` ou `identity`)                                                       |
| `data.entities[].status`       | String            | Status da entidade (`REJECTED`)                                                                          |
| `data.entities[].reasons`      | Array\<String>    | Motivos específicos da reprovação do sócio                                                               |

## Exemplos de Payload

### KYC Aprovado

```json
{
  "event": "account.kyc.approved",
  "processedAt": "2026-01-30T16:00:00Z",
  "data": {
    "accountId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "accountType": "business",
    "status": "KYC_APPROVED",
    "reasons": [],
    "entities": []
  }
}
```

### KYC Rejeitado

```json
{
  "event": "account.kyc.reproved",
  "processedAt": "2026-01-30T16:00:00Z",
  "data": {
    "accountId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "accountType": "business",
    "status": "KYC_REPROVED",
    "reasons": ["PARTNERS_ARE_MISSING"],
    "entities": [
      {
        "document": "12345678901",
        "analysisType": "kyc",
        "status": "REJECTED",
        "reasons": ["NAME_MISMATCH"]
      }
    ]
  }
}
```

### Biometria Rejeitada

```json
{
  "event": "account.biometric.rejected",
  "processedAt": "2026-01-30T16:00:00Z",
  "data": {
    "accountId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "accountType": "business",
    "status": "BIOMETRIC_REJECTED",
    "reasons": ["FACE_MISMATCH"],
    "entities": [
      {
        "document": "12345678901",
        "analysisType": "identity",
        "status": "REJECTED",
        "reasons": ["FACE_MISMATCH"]
      }
    ]
  }
}
```

### Múltiplas reprovações (KYC e biometria em sócios diferentes)

Quando sócios distintos falham em análises diferentes, todas as entidades reprovadas aparecem no mesmo payload. O campo `event` indica o tipo primário de reprovação (KYC tem prioridade sobre biometria).

```json
{
  "event": "account.kyc.reproved",
  "processedAt": "2026-01-30T16:00:00Z",
  "data": {
    "accountId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "accountType": "business",
    "status": "KYC_REPROVED",
    "reasons": ["NAME_MISMATCH", "FACE_MISMATCH"],
    "entities": [
      {
        "document": "12345678901",
        "analysisType": "kyc",
        "status": "REJECTED",
        "reasons": ["NAME_MISMATCH"]
      },
      {
        "document": "98765432100",
        "analysisType": "identity",
        "status": "REJECTED",
        "reasons": ["FACE_MISMATCH"]
      }
    ]
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.barte.com/banking/api/webhooks/webhooks-v2.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
