Skip to content

MED Details

Queries the complete details of a specific MED (Special Refund Mechanism) process.

Endpoint

GET /api/external/med/:id

Headers

HeaderTypeRequiredDescription
AuthorizationStringYesApiKey {client_id}:{client_secret}
X-Key-CaseStringNoSet to camelCase to receive response fields in camelCase (default is snake_case)

Path Parameters

ParameterTypeRequiredDescription
idStringYesMED process identifier

Example

bash
curl -X GET https://api.owem.com.br/api/external/med/MED20260307001 \
  -H "Authorization: ApiKey $CLIENT_ID:$CLIENT_SECRET"

Success Response (200)

json
{
  "worked": true,
  "med": {
    "id": "MED20260307001",
    "type": "REFUND_REQUEST",
    "status": "ACKNOWLEDGED",
    "amount": 50000,
    "original_end_to_end_id": "E37839059202603071530000001",
    "reason": "Fraude reportada pelo pagador",
    "created_at": "2026-03-07T18:00:00Z"
  }
}

Status in UPPERCASE

Possible values: ACKNOWLEDGED, CLOSED, CANCELLED. Passed through as received from the PIX provider (OnZ/BACEN) — no normalization. See med-list for details.

FieldTypeDescription
workedBooleantrue indicates operation success
med.idStringUnique MED identifier
med.typeStringType: REFUND_REQUEST or REFUND_CANCELLED
med.statusStringCurrent process status (ACKNOWLEDGED, CLOSED, CANCELLED)
med.amountIntegerValue in base units (÷ 10,000 for BRL). 50000 = R$ 5.00
med.original_end_to_end_idStringE2E of the original PIX transaction. Use to cross-reference with GET /transactions/ref/:external_id
med.reasonStringReason provided by the requester (free text). null if not available
med.created_atStringOpening date (ISO 8601 UTC)

Additional fields not exposed via External API

The OnZ/BACEN provider returns more fields than those exposed by this endpoint. Fields deliberately filtered in the serializer include:

Field (OnZ)DescriptionWhere to get it today
analysisResultFinal decision: AGREED or DISAGREEDWebhook pix.infraction.resolved
analysisDetailsJustification of the decisionWebhook pix.infraction.resolved
infractionTypeREFUND_REQUEST or REFUND_CANCELLEDAlready exposed in med.type
fraudTypeSCAM, ACCOUNT_TAKEOVER, COERCION, FRAUDULENT_ACCESS, OTHERWebhook pix.refund.requested (field fraud_category)
situationTypeType of situation involved (BACEN taxonomy)Merchant portal (/compliance) — not available via External API
defenseDeadlineBACEN deadline for defense submissionWebhook pix.infraction.created

This omission is deliberate (known gap). If you need to consume these fields programmatically, contact compliance@owem.com.br — or use the listed webhooks, which always carry the relevant fields at the moment of the event.

See Infractions (full flow) to understand the relationship between MED and Infractions.

Value in subcentavos, not in BRL

The amount field is in subcentavos (1 BRL = 10,000 subcentavos). Value 50000 = R$ 5.00 — not R$ 50,000. Never multiply by 100 or use float.

Error Response (404)

json
{
  "worked": false,
  "errors": {
    "not_found": "MED não encontrado"
  }
}

404 may indicate a transient error

If the MED exists in another channel (webhook, previous listing) but returns 404 in this query, it may be a transient OnZ provider failure. Try again in a few seconds. If it persists after 5 min, contact support.

The backend converts all provider errors (including timeouts and network errors) into HTTP 404 with detail: "MED nao encontrado". To distinguish "does not exist" from "transient failure", first check the List MED endpoint — if the ID appears in the list but the detail returns 404, it is transient.

Error Response (401)

json
{
  "worked": false,
  "errors": {
    "unauthorized": "Missing API key credentials. Use Authorization: ApiKey <client_id>:<client_secret>"
  }
}

Real-time tracking (webhooks)

The pix.refund.requested and pix.refund.completed webhook events ARE dispatched automatically by the backend as of April 2026. It is recommended to subscribe to these webhooks to avoid depending on polling. Polling on GET /med/:id or GET /med continues to work as an alternative.

Owem Pay Instituição de Pagamento — ISPB 37839059