MED — Special Refund Mechanism
What is MED?
MED (Special Refund Mechanism — "Mecanismo Especial de Devolução") is a mechanism regulated by the Central Bank of Brazil that allows amounts in PIX transactions to be refunded when there is suspicion of fraud or operational failure. Unlike a regular reversal, MED involves formal analysis between financial institutions, with deadlines and rules defined by BACEN.
MED is a mandatory regulatory process. Your company must be prepared to receive, analyze, and respond to MED notifications within the deadlines established by the Central Bank.
When is a MED opened?
A MED may be triggered by the payer's bank (requesting bank) in two scenarios:
| Scenario | Description | Example |
|---|---|---|
| Fraud | Suspected unauthorized transaction, social engineering, fraudulent access | Payer claims they did not perform the PIX |
| Operational failure | System error that resulted in undue credit | Duplicated PIX due to technical failure |
Causes
The cause field indicates the MED reason when available (e.g., UNAUTHORIZED_TRANSACTION, SOCIAL_ENGINEERING). In some cases cause may be null — in that scenario, the description field contains the descriptive text of the request.
Possible cause values
| Value | Description |
|---|---|
UNAUTHORIZED_TRANSACTION | Payer claims they did not authorize the transaction |
FRAUDULENT_ACCESS | Unauthorized access to the payer's account |
SOCIAL_ENGINEERING | Manipulation-based scam (e.g., fake bank employee) |
OPERATIONAL_FAILURE | Technical error that generated undue credit |
null | Cause not classified — see the description field for details |
The cause field can be null when the request origin does not provide a structured code. In those cases, the description field contains descriptive text (e.g., payer report, formal bank notification). In your integration, treat cause as optional and always display description as complementary information.
The platform records the MEDs reported by your account's settlement provider and links them to the original transaction when it finds the matching receipt (isReconciled: true). Use GET /api/med to check the up-to-date status at any time.
Your company's role
When a MED is opened against a PIX received in your account, the contested institution is the one that received the PIX, and your company (or your client) is the beneficiary. In the flow:
- You receive the notification — via the
MedCreatedwebhook - You analyze the situation — check whether the transaction is legitimate and gather evidence
- The balance may be blocked — the contested amount is retained for possible refund
- The MED is answered — the refund is accepted or rejected, and you receive
MedAcceptedorMedRejected
Balance blocking and MED response are managed internally by the platform. Your integration only needs to monitor webhooks to follow the MED status and take actions in your system (notify the client, update records, etc.).
MED Lifecycle
┌─────────────────────────────────────────────────────────────────┐
│ MED LIFECYCLE │
│ │
│ ┌──────────┐ ┌──────────┐ ┌───────────┐ │
│ │ OPEN │───▶│ RECEIVED │───▶│ ANALYZED │ │
│ └──────────┘ └──────────┘ └─────┬─────┘ │
│ │ │ │
│ │ ┌─────┴─────┐ │
│ ▼ ▼ ▼ │
│ ┌───────────┐ ┌──────────┐ ┌──────────┐ │
│ │ CANCELLED │ │ APPROVED │ │ REJECTED │ │
│ └───────────┘ └──────────┘ └──────────┘ │
│ │ │ │
│ ▼ ▼ │
│ Amount is Balance is │
│ refunded to unblocked for │
│ the payer the beneficiary │
└─────────────────────────────────────────────────────────────────┘MED statuses
Status (status) | Description |
|---|---|
OPEN | MED created by the requesting bank |
RECEIVED | MED received and under analysis |
CANCELLED | MED canceled by the requesting bank (before analysis) |
ANALYZED | Analysis completed with a result (see analysisResult) |
When each webhook is sent
Webhook (event) | Event to configure | When |
|---|---|---|
MedCreated | med_created | The MED is recorded on the platform and linked to a receipt in your account. The status comes in the payload (usually OPEN or RECEIVED) |
MedAccepted | med_accepted | The refund is approved and the amount is returned to the payer |
MedRejected | med_rejected | The refund is rejected and the blocked balance is released |
MEDs that could not be linked to a transaction in your account (isReconciled: false) do not generate a webhook. They appear in GET /api/med.
Analysis result
Result (analysisResult) | Description | Webhook | Financial impact |
|---|---|---|---|
APPROVED | Refund accepted — amount returned to payer | MedAccepted | Amount debited from beneficiary account |
REJECTED | Refund denied — balance remains with beneficiary | MedRejected | Balance unblocked |
Regulatory Deadlines (BACEN)
MED is regulated by the Central Bank of Brazil and has specific deadlines to acknowledge receipt, analyze the request, and respond to the requesting bank. Failing to respond within the deadline can result in automatic refund approval and regulatory reporting to BACEN.
The exact deadlines follow the current Central Bank regulation (applicable BCB Resolution for PIX MED) and may be updated by the regulator. Consult your legal / compliance team for the most recent binding values before sizing internal SLAs.
Operational recommendations:
- Configure internal alerts with a buffer before the regulatory deadline (e.g., T-24h before expiry) to avoid automatic approval by inaction.
- Monitor the
MedCreatedwebhook in real time — this is the trigger to start the analysis-deadline countdown. - Internally document the response policy (who analyzes, who approves, who responds to the MED) and test the end-to-end flow before going to production.
- Keep evidence (logs, defense documents, communication history) for regulatory audit.
Integration flow
Use the dashboard (https://banking.fypay.me), under Settings → Webhooks, to configure callback URLs for the med_created, med_accepted, and med_rejected events. See the webhook setup guide.
When a MED is opened against a transaction on your account, you receive a webhook with details: cause, requesting bank, original transaction, and status.
Use GET /api/med to query MED status at any time (filter by status, date, or reconciliation) and GET /api/med/\{id\} to see the details of a MED, including the status history and the block.
When analysis concludes, you receive MedAccepted (refund approved) or MedRejected (refund denied). Update your records accordingly.