Skip to main content
MED processing webhooks report case and infraction lifecycle changes through a common versioned envelope. Receiving these events requires an active subscription for the intended owner and event type.
The ordinary Create Webhook endpoint does not accept MED_PROCESSING. The event names below describe delivered MED payloads; they are not additional values for the ordinary subscription API. Create the subscription in the Merchant Dashboard. OpenAPI does not currently support creating these subscriptions.

Configure Delivery in the Merchant Dashboard

1

Open webhook settings

In the Merchant Dashboard, select API Keys. On the API Keys and Webhooks page, find Webhooks and click Add Webhook.
2

Select the application and event type

Select the intended App ID. For Event Type, select MED PROCESSING for MED case notifications or INFRACTION PROCESSING for infraction notifications. These are dashboard labels; the payload event names are listed in Events.
3

Save the callback endpoint

Enter your receiver’s Callback URL, select application/json for Content Type, and click Confirm. Check that the subscription appears in the Webhooks list with status Active. If you need both event types, add a subscription for each.
An active subscription confirms configuration, not successful delivery. Implement Signature Verification and Delivery and Retries in your receiver.

Subscription Scopes

ScopeMatching Rule
USERMatches user_id; the subscription does not target an account.
ACCOUNTMatches the exact owner ISPB and account number.
One source event can create separate USER and ACCOUNT deliveries. Each matching subscription receives its own delivery_id. The callback exposes subscription_scope but does not expose the owner identifiers.

Events

event_typeTrigger
MED_CASE_CREATEDA case is created with a valid owner.
MED_CASE_STATUS_CHANGEDAn existing case moves to a different status.
INFRACTION_RECEIVEDA new infraction is stored for an owned payer case.
INFRACTION_STATUS_CHANGEDAn existing infraction moves to a different status.
A status-change event is not created when the status value is unchanged.

Envelope Schema

FieldTypeDescription
delivery_idstringStable 64-character lowercase hexadecimal identifier for this subscription delivery.
event_idstringStable identifier of the source event. Treat it as opaque.
event_typestringOne of the four MED event types.
event_versionstringPayload contract version; currently 1.0.
subscription_scopestringUSER or ACCOUNT.
occurred_atnumberEvent time as Unix milliseconds.
resource_idstringCase or infraction resource identifier.
resource_versionnumberVersion of the resource snapshot.
dataobjectCase or infraction snapshot.

Resource Types & Statuses

Case events contain:
  • case_id
  • transaction_id
  • root_end_to_end_id
  • status
  • previous_status (for a status change)
  • requested_amount
  • blocked_amount_total
  • returned_amount_total
  • currency
  • flow_type
  • created_at
  • updated_at
  • analysis_deadline
  • manual_refund_deadline
Case status values: CREATED, TRACKED, AWAITING_ANALYSIS, ANALYZED, RETURN_PROCESSING, COMPLETED, CANCELLED, FAILED.flow_type values: UNSPECIFIED, AUTOMATED, MANUAL.
Infraction events contain:
  • case_id
  • infraction_id
  • dict_infraction_id
  • root_end_to_end_id
  • status
  • previous_status (for a status change)
  • requested_amount
  • blocked_amount
  • currency
  • analysis_result
  • received_at
  • sla_deadline
  • closed_at
Infraction status values: RECEIVED, BLOCKING_PENDING, BLOCKED, ANALYSIS_PENDING, CLOSED_AGREED, CLOSED_DISAGREED, CANCELLED, FAILED.analysis_result values: UNSPECIFIED, AGREED, DISAGREED.
All MED amount fields are decimal strings. MED timestamps are JSON numbers containing Unix milliseconds. previous_status is omitted when it does not apply. Ignore unknown fields so additive payload changes do not break your receiver.

Payload Examples


Ordering and Idempotency

  • Use delivery_id as the delivery idempotency key.
  • The same event_id sent to different subscriptions has different delivery_id values.
  • Deliveries are at least once and are not globally ordered.
  • Use resource_id and resource_version to reject stale snapshots.
  • Do not derive business meaning by parsing event_id.
See Delivery and Retries for acknowledgement and retry behavior.