Cancel a MED infraction
Cancels an infraction as the creator PSP (JDPI relato-infracao/cancelar, contract §2.3). Cancel is allowed at any time, even after Analisado. An unknown id returns a coded 404. Persists the JDPI response entity and returns it.
Authorizations
JWT bearer token issued by the identity provider.
Headers
Idempotency key for this write: any stable business string you choose, sent as the X-Idempotency request header - the same header, by the same name, that the Midaz ledger takes, so one integration sends one thing by one name. Send the SAME value again to retry safely: the plugin projects it deterministically into the GUID form JDPI requires (contract 6), so a repeat lands in the same JDPI dedup slot inside JD's 24h window and the operation is applied once. The raw value is never forwarded verbatim, so correlate JDPI-side logs with the projection rather than with what you sent. The header is REQUIRED: omitting it is refused 400 PIX-0061 before any JDPI call. BREAKING CHANGE: this value used to be the body field idempotencyKey, which no longer exists.
"med-infraction-cancel-2024-0001"
Path Parameters
The infraction GUID.
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Response
OK
ISPB of the counterparty.
"87654321"
JDPI creation timestamp (RFC 3339 UTC).
"2024-01-01T12:00:00.000Z"
ISPB of the infraction creator.
"12345678"
Deprecated: read createdAt, which carries the same value. JDPI creation timestamp (RFC 3339 UTC).
"2024-01-01T12:00:00.000Z"
Deprecated: read updatedAt, which carries the same value. JDPI last-modification timestamp (RFC 3339 UTC) — the poll watermark.
"2024-01-01T12:05:00.000Z"
EndToEndId of the suspect payment.
"E1234567820240101000000000000001"
Deprecated: read infractionId, which carries the same value. Infraction GUID (the natural key).
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Infraction GUID (the natural key).
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Deprecated: read reason, which carries the same value. Infraction motivo code (1=Solicitacao de devolucao, 2=Cancelamento da devolucao).
1
Deprecated: read reasonDescription, which carries the same value. Human-readable infraction motivo label.
"Solicitacao de devolucao"
Deprecated: read counterpartIspb, which carries the same value. ISPB of the counterparty.
"87654321"
Deprecated: read creatorIspb, which carries the same value. ISPB of the infraction creator.
"12345678"
Infraction motivo code (1=Solicitacao de devolucao, 2=Cancelamento da devolucao).
1
Human-readable infraction motivo label.
"Solicitacao de devolucao"
stRelatoInfracao lifecycle code (0=Aberto, 1=Recebido, 2=Cancelado, 3=Analisado).
0
Human-readable stRelatoInfracao label.
"Aberto"
Situation-origin code (0..5).
0
Human-readable tpSitOrigem label.
"Golpe/Estelionato"
JDPI last-modification timestamp (RFC 3339 UTC) — the poll watermark.
"2024-01-01T12:05:00.000Z"
Analysis detail.
"Confirmed."
Infraction analysis result (0=Aceita, 1=Rejeitada); null until analysed.
0
Human-readable infraction analysis-result label.
"Aceita"
Free-text detail to help the recebedor analyse.
"Suspected scam."
Deprecated: read details, which carries the same value. Free-text detail to help the recebedor analyse.
"Suspected scam."
Deprecated: read analysisDetails, which carries the same value. Analysis detail.
"Confirmed."
Fraud-marker GUID, when analysis produced one.
"c3d4e5f6-a7b8-9012-cdef-345678901234"
Deprecated: read fraudMarkerId, which carries the same value. Fraud-marker GUID, when analysis produced one.
"c3d4e5f6-a7b8-9012-cdef-345678901234"
Deprecated: read recoveryId, which carries the same value. Value-recovery GUID, when the infraction came from a recovery.
"b2c3d4e5-f6a7-8901-bcde-f23456789012"
Value-recovery GUID, when the infraction came from a recovery.
"b2c3d4e5-f6a7-8901-bcde-f23456789012"
Deprecated: read analysisResult, which carries the same value. Infraction analysis result (0=Aceita, 1=Rejeitada); null until analysed.
0
Deprecated: read analysisResultDescription, which carries the same value. Human-readable infraction analysis-result label.
"Aceita"
Amount to block on the account, in centavos; null when absent.
15000

