docs
Webhooks

MedCreated

Overview

The MedCreated event is sent when a new MED (Special Refund Mechanism) is registered against a PIX transaction received by your account. This means the payer's bank is requesting the amount to be refunded.

The event is only sent when the MED is linked to a transaction on your account, so originalTransaction is filled in.

This event requires immediate attention. The MED has regulatory deadlines defined by the Central Bank of Brazil for analysis and response.

FieldValue
eventMedCreated
MeaningNew MED opened — refund request received
Recommended actionAlert the risk team, evaluate the original transaction

Full Payload

{
  "event": "MedCreated",
  "medId": 42,
  "idSolicitacaoDevolucao": "MED-2026041012345",
  "endToEndId": "E12345678202604101030abcdef123456",
  "status": "RECEIVED",
  "reason": "REFUND_REQUEST",
  "cause": "UNAUTHORIZED_TRANSACTION",
  "description": "Customer claims not to have performed the transaction",
  "analysisResult": null,
  "analysisDetails": null,
  "originalTransaction": {
    "transactionId": 78432,
    "amount": 1500.00,
    "endToEndId": "E12345678202604101030abcdef123456",
    "externalId": "ORDER-78432"
  },
  "blockStatus": null,
  "blockedAmount": null,
  "defenseStatus": null,
  "requestingBank": {
    "ispb": "00000000",
    "name": "BCO DO BRASIL S.A."
  },
  "contestedBank": {
    "ispb": "13140088",
    "name": "ACESSO SOLUÇÕES DE PAGAMENTO"
  },
  "statusHistory": [
    { "status": "OPEN", "date": "2026-04-10T09:55:12.000Z" },
    { "status": "RECEIVED", "date": "2026-04-10T10:00:00.000Z" }
  ],
  "createdAt": "2026-04-10T10:00:00.000Z",
  "updatedAt": "2026-04-10T10:00:00.000Z"
}

MED events have no root-level transactionId. For idempotency, use the combination medId + event. As with transaction events, MED webhooks are signed with X-Avista-Signature (once the key has been generated) and follow the same timeout and retry rules.

Fields

FieldTypeDescription
eventstringEvent type: "MedCreated"
medIdnumberUnique MED identifier in the system
idSolicitacaoDevolucaostringUnique refund request identifier
endToEndIdstringEnd-to-end ID of the original PIX transaction
statusstringMED status, normalized: OPEN, RECEIVED, CANCELLED or ANALYZED. At opening, usually OPEN or RECEIVED
reasonstringReason: "REFUND_REQUEST" or "REFUND_CANCELLATION"
causestring | nullCause code when available (UNAUTHORIZED_TRANSACTION, FRAUDULENT_ACCESS, SOCIAL_ENGINEERING, OPERATIONAL_FAILURE) or null. If null, see description. Treat unknown values as generic text
descriptionstring | nullDescriptive text (payer's report, formal bank notification, etc.)
analysisResultstring | nullAnalysis result: APPROVED, REJECTED or null (null at this stage)
analysisDetailsstring | nullAnalysis details (null at this stage)
originalTransactionobject | nullData about the original PIX transaction
originalTransaction.transactionIdnumberInternal platform transaction ID
originalTransaction.amountnumberOriginal amount in BRL
originalTransaction.endToEndIdstringE2E ID of the original transaction
originalTransaction.externalIdstring | nullExternal ID you provided when creating the transaction
blockStatusstring | nullBalance block status: null, "BLOCKED", "UNBLOCKED", "APPROVED". At opening, usually null
blockedAmountnumber | nullBlocked amount in BRL, or null if there was no block
defenseStatusstring | nullDefense status: null, "PENDING", "SUBMITTED"
requestingBankobjectBank that opened the MED (payer's bank)
requestingBank.ispbstring | nullRequesting bank ISPB code
requestingBank.namestring | nullRequesting bank name
contestedBankobjectContested bank (your institution)
contestedBank.ispbstring | nullContested bank ISPB code
contestedBank.namestring | nullContested bank name
statusHistoryarrayHistory of MED status transitions
statusHistory[].statusstringStatus at that moment (same values as status)
statusHistory[].datestringTransition date (ISO 8601)
createdAtstringMED creation date (ISO 8601)
updatedAtstringLast update date (ISO 8601)

Next Steps

On this page