PayZuPayZu Docs

MED (Special Refund Mechanism)

The MED (Special Refund Mechanism) is a Central Bank procedure that protects Pix users in cases of fraud, scam, or unauthorized transactions.

It works as a "safety net" of the arrangement: when suspicious activity is identified, the payer's institution opens a formal process requesting the refund.

At PayZu, the MED flow is delivered via webhook, reusing the same callbackUrl of the transaction. The status of the original operation is updated and the infraction object is inserted into the payload.

Conceptual MED flow

Hover over the boxes to see the technical status. Click to go directly to the section that details each value.

The high-level flow:

  1. Pix transaction completed successfully.
  2. Problem identified (fraud, error, unauthorized charge).
  3. Payer's institution opens the MED in the arrangement, webhook arrives with status: "OPEN".
  4. Receiving bank is notified and may block the amount during analysis.
  5. Dispute analysis by the institutions + Bacen rules.
  6. Result: accepted (AGREED, amount refunded) or rejected (DISAGREED, transaction remains valid).

Example of webhook with infraction

Real example of the payload received when a Pix transaction is subject to an infraction:

{
  "id": "PAYZU20251123104518DF75D20A8F",
  "type": "DEPOSIT",
  "status": "COMPLETED",
  "serviceFeeCharged": 1,
  "amount": 30,
  "clientReference": "d2b2a5ed-f1a4-477e-81da-9",
  "qrCodeText": "00020101021226870014br.gov.bcb.pix...",
  "payerName": "João da Silva",
  "payerDocument": "12345678901",
  "payerInstitutionName": "PAYZU IP",
  "receiverName": "PAYZU LTDA",
  "receiverDocument": "123456789010110",
  "endToEndId": "E18236120202511231046s1235ee7",
  "paidAt": "2025-11-23T10:46:26.986Z",
  "createdAt": "2025-11-23T10:45:18.403Z",
  "updatedAt": "2025-11-23T10:46:27.346Z",
  "callbackUrl": "https://seuwebhook.com",
  "infraction": {
    "id": "cmide759mb9i3s601bhwf6e",
    "protocol": "4dd32924-9b53-4408-af4b-6d3b4d7ac",
    "status": "OPEN",
    "type": "REFUND_REQUEST",
    "reportDetails": "Fraud report: transaction formally contested by the payer",
    "reportedBy": "DEBITED_PARTICIPANT",
    "analysisResult": null,
    "analysisDetails": null,
    "reportedAt": "2025-11-24T16:52:15.808Z",
    "createdAt": "2025-11-24T17:00:00.490Z",
    "updatedAt": "2025-11-24T17:00:00.490Z"
  }
}

Fields of the infraction object

FieldTypeDescription
idstringUnique infraction identifier
protocolstringPayment provider protocol number
statusInfractionStatusCurrent infraction status
typeInfractionTypeInfraction type
reportDetailsstringDescription of the dispute reason
reportedByReportedByWho reported the infraction
analysisResultAnalysisResult | nullFinal decision (null while pending)
analysisDetailsstring | nullDecision justification
reportedAtstringWhen it was reported
expiresAtstring | nullDeadline for resolution
createdAtstringCreation date
updatedAtstringLast update

status values (InfractionStatus)

ValueDescription
WAITING_PSPAwaiting provider response
OPENActive and under analysis
ACKNOWLEDGEDAcknowledged by the institution
DEFENDEDDefense has been submitted
ANSWEREDAdditional information has been provided
WAITING_ADJUSTMENTSAwaiting documentation
CLOSEDResolved with final decision
CANCELLEDCancelled before resolution

type values (InfractionType)

ValueDescription
REFUND_REQUESTStandard refund request
FRAUDSecurity-related complaint
REFUND_CANCELLEDCancellation of previous refund

reportedBy values

ValueDescription
DEBITED_PARTICIPANTReported by the payer's institution
CREDITED_PARTICIPANTReported by the receiver's institution

analysisResult values

ValueDescription
AGREEDInfraction accepted: refund will be processed
DISAGREEDInfraction rejected: no refund

How to react when you receive an infraction

Detect the callback

When the infraction object arrives in the payload, trigger an internal alert immediately. The Bacen deadline is short, typically 72h, and silence is usually interpreted as acceptance.

if (callback.infraction?.status === 'OPEN') {
  await alertOperations({
    transactionId: callback.id,
    infractionId: callback.infraction.id,
    expiresAt: callback.infraction.expiresAt,
    reportDetails: callback.infraction.reportDetails,
  });
}

Investigate

Use GET /user/infractions/{id} for full details of the dispute, original transaction, and deadline. Cross-reference with your logs:

  • DICT logs before the payment (if a withdrawal)
  • Who performed the operation in your system
  • Customer IP, device, session
  • Transaction history for that payerDocument

Decide: defend or accept

ScenarioRecommended decision
Legitimate charge, you have evidence of product/service deliveryDefend via POST /user/infractions/{id}/defenses
Real suspicion of fraud on your side (compromised customer)Accept (do not defend). The amount is refunded and the case closes.
You have no evidenceEvaluate case by case. Without defense, Bacen tends to accept the contestation.

Track until CLOSED

The infraction goes through states (OPEN → ACKNOWLEDGED/DEFENDED → ANSWERED/WAITING_ADJUSTMENTS → CLOSED). Each change generates a new callback. The final result comes in analysisResult when status: "CLOSED".

Complete lifecycle

Financial impact

When the infraction is AGREED

When the infraction is DISAGREED

On this page