> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://en.docs.api.corpx.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://en.docs.api.corpx.com/_mcp/server.

# pix.batch.completed

POST 

Lote de PIX terminou com estatísticas de sucesso e falha (cada item também emite pix.out.\*)

Enviado quando todos os itens de um [lote de PIX](/baas/guias/pagar/pix-em-lote)
chegaram a um desfecho. `status` é `COMPLETED`, `PARTIAL_FAILED` ou `FAILED`.
Cada item do lote é um PIX out comum e já emitiu o seu próprio
`pix.out.completed`, `pix.out.failed` ou `pix.out.timeout`; este evento é o
fechamento do lote, não substitui os eventos por item.

`statistics` traz contagens (`total`, `completed`, `failed`) e somas em BRL como
string decimal (`totalAmount`, `completedAmount`, `failedAmount`). Para a lista
de itens, `GET .../pix/batches/{batchId}`; para o CSV de correção dos que
falharam, `GET .../items/export?status=failed`; para os comprovantes em ZIP,
`POST .../receipts`.

Assine este evento com `authType: HMAC`. A entrega traz `X-Signature`; valide
o HMAC-SHA256 sobre os bytes brutos do corpo e deduplique pelo `id`.

Reference: https://en.docs.api.corpx.com/baas/referencia/webhook-events/webhook-pix-batch-completed

## Request

### Headers

- `X-Signature` (string, optional) — Present when the subscription uses `authType: HMAC`: `hex(HMAC_SHA256(secret, raw_request_body))` (64 lowercase hex characters). Compare in constant time against your own computation over the raw body.

### Payload

- `id` (string, required) — Deterministic event id. Same `id` means the same event, possibly redelivered — deduplicate on it.
- `type` (enum, required) — Event type. Full list at `GET /v1/webhooks/events`.
  - Allowed values: `pix.batch.completed`
- `occurredAt` (datetime, required) — RFC 3339, UTC with `Z`.
- `schemaVersion` (string, required) — `1.0` today; bumped only on breaking payload changes.
- `environment` (enum, required) — Environment that emitted the event.
  - Allowed values: `production`, `sandbox`
- `tenantId` (string, required) — Tenant the event belongs to.
- `data` (WebhooksWebhookPixBatchCompletedPayloadContentApplicationJsonSchemaData, required) — Event-specific payload. See each webhook.
- `accountId` (string, optional) — CorpX account where the event happened. Empty on cross-account events.

## Types

### WebhooksWebhookPixBatchCompletedPayloadContentApplicationJsonSchemaData

Event-specific payload. See each webhook.

- `batchId` (string, optional)
- `accountId` (string, optional)
- `status` (string, optional)
- `statistics` (WebhooksWebhookPixBatchCompletedPayloadContentApplicationJsonSchemaDataStatistics, optional)

### WebhooksWebhookPixBatchCompletedPayloadContentApplicationJsonSchemaDataStatistics

- `total` (integer, optional)
- `completed` (integer, optional)
- `failed` (integer, optional)
- `totalAmount` (string, optional)
- `completedAmount` (string, optional)
- `failedAmount` (string, optional)