Pagamento falhou
Pagamento vai a FAILED. Só failure.code: PAYMENT.PROVIDER_ERROR não é final: a reconciliação pode gerar payment.succeeded depois.
Escopo de leitura exigido do cliente dono do endpoint: um de payments:pix:read, payments:boleto:read, payments:cards:read.
Entrega: POST na url do endpoint com Content-Type: application/json; charset=utf-8, corpo de até 256 KB, TLS 1.2+, sem seguir redirect, IP validado contra SSRF a cada tentativa. Verificar a assinatura sobre os bytes crus (nunca sobre JSON re-serializado). Entrega duplicada é esperada e a ordem não é garantida: deduplicar por id.
X-Kodano-Signature*stringt=<unix em segundos>,v1=<hex>; durante a rotação, t=<unix>,v1=<novo>,v1=<anterior>. v1 = hex minúsculo de HMAC-SHA256(chave = bytes UTF-8 do segredo inteiro, inclusive whsec_; mensagem = "{t}." + bytes crus do corpo). Rejeitar |agora − t| > 300 s, comparar em tempo constante e aceitar se qualquer v1 conferir.
X-Kodano-Event-Id*stringIgual ao id do corpo; chave de deduplicação.
^evt_X-Kodano-Event-Type*stringIgual ao type do corpo.
"payment.succeeded""payment.failed""payment.refunded""chargeback.received""withdrawal.completed""withdrawal.failed""fx.operation.settled""fx.operation.expired""fx.operation.failed""fx.operation.action_required""fx.operation.refunded""settlement.closed""webhook_endpoint.disabled""ping"User-Agent*stringKodano-Webhooks/1.0.
application/json- body
Envelope: corpo assinado do webhook, item de GET /v1/events e resposta de GET /v1/events/{id}.
id*stringIgual ao header X-Kodano-Event-Id; chave de deduplicação.
^evt_type*string"payment.succeeded""payment.failed""payment.refunded""chargeback.received""withdrawal.completed""withdrawal.failed""fx.operation.settled""fx.operation.expired""fx.operation.failed""fx.operation.action_required""fx.operation.refunded""settlement.closed""webhook_endpoint.disabled""ping"apiVersion*string2026-10-01.
createdAt*stringdate-timeenvironment*string"sandbox""production"merchantId*|mrc_…; null em evento de organização.
data*Recebido. Sucesso é qualquer 2xx em até 10 s (DNS, TLS e resposta inclusos); o corpo da resposta é ignorado.
{ "id": "evt_<id do evento>", "type": "payment.failed", "apiVersion": "2026-10-01", "createdAt": "2026-10-16T13:15:43Z", "environment": "sandbox", "merchantId": "mrc_e3cc4727054da558273162251e310d29", "data": { "object": { "id": "pay_98viJDJcYyoItylIdKY4Jxa8JNQtNSfa", "status": "FAILED", "method": "CARD", "amount": 25000, "currency": "BRL", "description": "Assinatura anual", "customer": { "id": "cus_Lbfbv3xA5PQh8H5jKlF7yXqRNJxlSZXf", "name": "Ana Souza", "document": "123******09" }, "card": { "id": "card_r2Cls2kEBglFQCeCxEZDpiQEyVpSBhad", "brand": "VISA", "last4": "4242", "installments": 3, "capturedAmount": null, "capturedAt": null }, "failure": { "code": "PAYMENT.DECLINED", "message": "Payment declined by the issuer" }, "statusReason": null, "refundedAmount": 0, "refundedAt": null, "paymentLinkId": null, "metadata": {}, "createdAt": "2026-10-16T13:15:40Z", "updatedAt": "2026-10-16T13:15:42Z" } }}{ "X-Kodano-Signature": "t=1792155732,v1=d3e134866c73f1ace702a6dab8e1d8225c471951a3f88f395c987bc441b22962", "X-Kodano-Event-Id": "string", "X-Kodano-Event-Type": "payment.succeeded", "User-Agent": "Kodano-Webhooks/1.0"}