Skip to main content

Disputes - Special Return Mechanism (MED)

MED (Mecanismo Especial de Devolucao) is the process by which a payer can request the return of a PIX payment, typically due to suspected fraud or operational error. When a MED is filed against your account, you have a deadline to contest or accept the return.

Lifecycle

RECEIVED -> CONTESTED -> PENDING_DECISION -> ACCEPTED / REJECTED / CANCELED
StatusDescription
RECEIVEDMED received. Awaiting your response within the deadline (holderAnswerDeadline).
CONTESTEDResponse submitted (AGREE or DISAGREE) with evidence.
PENDING_DECISIONResponse sent to the bank, awaiting regulator decision.
ACCEPTEDMED accepted. The amount will be returned to the payer (total or partial).
REJECTEDMED rejected. The amount stays in your account.
CANCELEDMED canceled by the claimant or regulator.

Final Result

When a MED is closed, the result field indicates the banking partner outcome:

ResultDescription
AGREEDBank agreed with the return
DISAGREEDBank disagreed with the return

Partial Refunds

A MED can result in multiple partial refunds. Each refund has its own E2E (D code) and amount. The refundedAmount field is the sum of all refunds made.

ScenarioExample
Full refundoriginalAmount: 1000.00, refundedAmount: 1000.00
Partial refundoriginalAmount: 1000.00, refundedAmount: 300.00
No refund (no balance)originalAmount: 1000.00, refundedAmount: 0.00

Receiving MEDs via Webhook

When a MED is filed, you receive a pix.med.opened webhook. When updated, pix.med.updated.

{
"type": "pix.med.opened",
"data": {
"endToEndId": "E303062942026021812490000005QLMv",
"medId": "204cc938-da3d-4f04-baf3-0b2e6a2f1283",
"status": "DELIVERED",
"type": "REVERSAL",
"method": "INVASION",
"description": "I was scammed, did not receive the contracted product",
"flow": "IN",
"openedAt": "2026-02-18T19:34:14Z"
}
}

Status History

The API maintains a complete history of all status changes. Each entry contains:

{
"history": [
{ "status": "RECEIVED", "rawStatus": "DELIVERED", "timestamp": "2026-02-18T19:34:14Z", "description": "MED received" },
{ "status": "CONTESTED", "rawStatus": "CONTESTED", "timestamp": "2026-02-19T10:00:00Z", "description": "Answer: DISAGREE" },
{ "status": "PENDING_DECISION", "rawStatus": "ACKNOWLEDGED", "timestamp": "2026-02-20T14:00:00Z" },
{ "status": "REJECTED", "rawStatus": "REJECTED", "timestamp": "2026-02-23T09:00:00Z" }
]
}

Contesting a MED

Coming soon: Contestation via API (submitting answers and uploading evidence) will be available in a future update. For now, contestation must be done directly through the banking partner's channel.

Listing MEDs

GET /v1/backoffice/tenants/{tenantId}/meds

Returns all MEDs for the tenant with complete history, refunds, and control fields (holderAnswerStatus, holderAnswerDeadline, result).

MED Rate Monitoring

GET /v1/backoffice/tenants/{tenantId}/med-stats?days=30

Reference Thresholds

RateStatusDescription
< 0.4%GreenHealthy rate
0.4% - 1.0%YellowAttention, monitor closely
> 1.0%RedElevated rate, action may be required

MED Policies

See the Policies and Rules guide for configuring auto-block and rate limits.