MED 抗辩
当 MED 或 PIX 违规需要在 webhook 通知的期限前回复时,使用此 endpoint。
http
POST /api/external/med/{id}/defense
Content-Type: application/json
Authorization: ApiKey {client_id}:{client_secret}
hmac: {hmac_sha512_signature}所需权限: payment:write。
{id} 是 GET /api/external/med, GET /api/external/med/{id} 或违规 webhook 返回的 MED 案件/冻结 ID。该请求是 POST,因此必须遵循其他写入 endpoint 相同的 HMAC-SHA512 规则。
Body
json
{
"defense_text": "客户确认了该操作,并发送了服务证据。",
"evidence": [
{
"type": "whatsapp",
"url": "https://your-domain.example/evidence/med-123.png",
"description": "确认持有人请求的对话截图",
"source": "whatsapp",
"filename": "conversation-med-123.png",
"received_at": "2026-06-02T13:30:00Z"
}
]
}每个 evidence 项必须至少包含 url 或 description。每次提交最多接受 10 个证据引用。二进制附件上传仍在 Minha Konta 门户中完成,用于分析和未来审计。
响应
json
{
"worked": true,
"status": "defense_submitted",
"med_id": "3f1e2c41-c269-4fa8-a151-49e739f8d37d",
"block_id": "3f1e2c41-c269-4fa8-a151-49e739f8d37d",
"evidence_count": 1,
"defense_submitted_at": "2026-06-02T16:30:12Z"
}登记后,Minha Konta 会发送 pix.infraction.defense_submitted。最终结果之后通过 pix.infraction.resolved 到达。
完整流程请看 PIX 违规和 MED。
