Skip to main content
MED 2.0 (Mecanismo Especial de Devolução) is BACEN’s enhanced mechanism to recover funds in cases of fraud, scams, and operational errors. MED 1.0 handles single-transaction disputes through infraction reports. MED 2.0 introduces a Funds Recovery flow that tracks how fraudulent funds moved across multiple accounts. The flow coordinates blocking, analysis, and refunds across the participating institutions. The Pix Indirect Plugin (BTG) exposes the full Funds Recovery lifecycle as REST endpoints. It also sends webhook events, so your system stays in sync with each status change.
MED 2.0 is a BACEN requirement for Pix participants. The plugin implements the Funds Recovery flow, so you can meet this requirement through your BTG indirect connection.

Concepts


Lifecycle and status


A Funds Recovery moves through the following states:
Funds Recovery

Endpoints


All Funds Recovery endpoints live under the DICT domain.

Create a funds recovery


Validation rules

A successful call returns HTTP 201. The response contains the new funds recovery and its tracking graph data. The plugin persists the record locally with status CREATED.

Tracking graph


The plugin fetches the tracking graph fresh from BTG on every call. The graph has no local state. It lists the persons, accounts, and transactions in the fraud flow, with the refundable amount for each transaction.
Response includes:
  • parameters: the graph generation parameters
  • persons[]: natural and legal persons involved
  • accounts[]: accounts in the flow with their participant ISPBs
  • transactions[]: Pix transactions with amounts and refundable amounts

Request refunds


Once the recovery reaches ANALYSED, request the return of blocked funds:
The plugin calls BTG, transitions the recovery to REFUNDING, and returns HTTP 200. Track individual refund statuses with List Refunds.

X-Purpose header (MED 2.0 transfers)


MED 2.0 refund transfers must carry a transaction purpose. The cashout endpoint accepts an optional X-Purpose header that the plugin sends to BTG as transactionType.
WITHDRAWAL and CHANGE must match the charge that the transfer pays. If they do not match, the plugin returns HTTP 400 with error PIX-0496. The values REFUND_AUTOMATIC_PIX and INSTALLMENT_PIX return HTTP 400 with error PIX-0429 (Unsupported Purpose).
Transfer responses also include the purpose value (Retrieve a Pix Transfer and the list endpoints). Existing records default to TRANSFER.

Correlation fields


Two existing entities carry a bacenFundsRecoveryId field that links a dispute to its parent recovery: Records created outside the MED 2.0 flow do not carry this field.

Webhooks


Two inbound BTG webhooks drive the Funds Recovery flow. Each one produces a matching outbound event to your system: Both use flowType: DICT. See the Webhooks guide for envelope format, retries, and routing. Funds recovery entity event:
Lifecycle event (pass-through):
Lifecycle body.event values: FUNDS_RECOVERY_ANALYSED, FUNDS_RECOVERY_COMPLETED, FUNDS_RECOVERY_INFORMATION_UPDATED, FUNDS_RECOVERY_CANCELLED.

Deprecation notice


Do not use Create an Infraction Report or Close an Infraction Report for new integrations. MED 2.0 deprecates both endpoints and manages infraction reports through the Funds Recovery flow. The endpoints still work for backward compatibility. New integrations must use the Funds Recovery APIs.

Next steps