MED Details
Queries the complete details of a specific MED (Special Refund Mechanism) process.
Endpoint
GET /api/external/med/:idHeaders
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | String | Yes | ApiKey {client_id}:{client_secret} |
X-Key-Case | String | No | Set to camelCase to receive response fields in camelCase (default is snake_case) |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | String | Yes | MED process identifier |
Example
curl -X GET https://api.owem.com.br/api/external/med/MED20260307001 \
-H "Authorization: ApiKey $CLIENT_ID:$CLIENT_SECRET"Success Response (200)
{
"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.
| Field | Type | Description |
|---|---|---|
worked | Boolean | true indicates operation success |
med.id | String | Unique MED identifier |
med.type | String | Type: REFUND_REQUEST or REFUND_CANCELLED |
med.status | String | Current process status (ACKNOWLEDGED, CLOSED, CANCELLED) |
med.amount | Integer | Value in base units (÷ 10,000 for BRL). 50000 = R$ 5.00 |
med.original_end_to_end_id | String | E2E of the original PIX transaction. Use to cross-reference with GET /transactions/ref/:external_id |
med.reason | String | Reason provided by the requester (free text). null if not available |
med.created_at | String | Opening 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) | Description | Where to get it today |
|---|---|---|
analysisResult | Final decision: AGREED or DISAGREED | Webhook pix.infraction.resolved |
analysisDetails | Justification of the decision | Webhook pix.infraction.resolved |
infractionType | REFUND_REQUEST or REFUND_CANCELLED | Already exposed in med.type |
fraudType | SCAM, ACCOUNT_TAKEOVER, COERCION, FRAUDULENT_ACCESS, OTHER | Webhook pix.refund.requested (field fraud_category) |
situationType | Type of situation involved (BACEN taxonomy) | Merchant portal (/compliance) — not available via External API |
defenseDeadline | BACEN deadline for defense submission | Webhook 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)
{
"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)
{
"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.