> This page is for BaaS.

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

# pix.med.updated

POST 

Atualização de MED

Enviado quando o status de uma disputa MED muda. É por aqui que você fica sabendo do desfecho, e é a **única** fonte de estado: o `POST .../answer` só registra a sua defesa (que segue para análise fora da API), e a disputa também se move por ação do BACEN e do banco do reclamante.

Reentrega do mesmo status não gera evento novo, e evento atrasado (carimbo do liquidante anterior ao que já registramos) é descartado — o status nunca regride.

**Estrutura do `data`:**
- `medId`: Identificador da disputa (mesmo do `pix.med.opened`).
- `originalEndToEnd`: `endToEndId` da transação PIX em disputa.
- `amount`: Valor disputado.
- `reasonCode`: Motivo reportado.
- `clientAnswerDeadlineIso`: Prazo da sua resposta (o mesmo da abertura).
- `status`: Status atual do MED — vocabulário próprio (`OPEN`, `PENDING_DECISION`, `ACCEPTED`, `REJECTED`, `CANCELED`; ver tabela de status acima).

**Mapeamento do status do liquidante** — o valor cru nunca sai no evento:

| Status do liquidante | `data.status` |
|---|---|
| `under-client-analysis`, `received` | `OPEN` |
| `client-analysis-delay` | `PENDING_DECISION` |
| `closed-full-refund`, `closed-partial-refund` | `ACCEPTED` |
| `closed-no-refund` | `REJECTED` |
| `canceled` | `CANCELED` |

Status desconhecido vira `OPEN`, não desfecho: perder a abertura de uma disputa custa o seu prazo de resposta, receber uma a mais só custa uma consulta.

Reference: https://docs.api.corpx.com/baas/referencia/webhook-events/webhook-pix-med-updated

## Request

### Headers

- `X-Signature` (string, optional) — Present when the subscription uses `authType: HMAC`: `base64(HMAC_SHA256(secret, raw_request_body))` (standard Base64, with padding). 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.med.updated`
- `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` (WebhooksWebhookPixMedUpdatedPayloadContentApplicationJsonSchemaData, required) — Event-specific payload. See each webhook.
- `accountId` (string, optional) — CorpX account where the event happened. Empty on cross-account events.

## Types

### WebhooksWebhookPixMedUpdatedPayloadContentApplicationJsonSchemaData

Event-specific payload. See each webhook.

- `medId` (string, optional)
- `originalEndToEnd` (string, optional)
- `amount` (double, optional)
- `reasonCode` (string, optional)
- `status` (string, optional)