MagenMagen Docs

Infractions (MED)

The MED (Special Refund Mechanism) is the Bacen process for contesting Pix in cases of fraud, payer error or well-founded suspicion. When a received charge becomes a dispute, Magen creates an infraction and you can submit a defense via API.

The response deadline is set by Bacen, usually 72h. Without a defense within the deadline, the amount may be refunded automatically. Configure an internal alert when receiving the callback with infraction.

List infractions

curl "https://api.magen.processamento.com/v1/user/infractions?status=OPEN&page=1&limit=50" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"

Schema at GET /user/infractions.

Infraction detail

Returns reason, contested amount, deadline and the related transaction.

curl "https://api.magen.processamento.com/v1/user/infractions/INFRACTION_ID" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"

Schema at GET /user/infractions/{id}.

Submit defense

curl -X POST "https://api.magen.processamento.com/v1/user/infractions/INFRACTION_ID/defenses" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Schema at POST .../defenses.

The body schema for this operation is not published in the public spec. To submit a defense with justification and attachments, contact support to confirm the fields.

Track defenses

List all submitted defenses:

curl "https://api.magen.processamento.com/v1/user/infractions/INFRACTION_ID/defenses" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"

Schema at GET .../defenses and GET .../defenses/{defenseId}.

Best practices

  • Automatic alert when receiving infraction in the callback, the deadline is short.
  • Persist the infraction's expiresAt and create a scheduled task.
  • Keep evidence (DICT logs before the payment, receipt, conversation with customer), it makes the defense easier.
  • Accept or contest quickly, silence is usually interpreted as acceptance.

Full MED details, statuses and lifecycle at MED, full overview.

Need help?

On this page