Webhooks / Verifying signatures
Verifying webhook signatures
Every webhook kepa sends is signed with HMAC-SHA256. Verify the signature on every request — it's the only way to confirm the event came from us and hasn't been tampered with.
IMPORTANTWithout verification, anyone who learns your endpoint URL can post events. Settlements, refunds, and disputes all flow through webhooks — treat the signing secret like a key.
The signature header
Every webhook includes a Kepa-Signature header containing a timestamp and one or more signatures.
Kepa-Signature: t=1712668094,v1=5257a869e7ecebed...,v0=...
Steps
- Extract the timestamp and the
v1signature from the header. - Concatenate
{timestamp}.{raw_body}. - Compute HMAC-SHA256 of the concatenated string using your endpoint's signing secret.
- Compare with constant-time equality. Reject if they differ, or the timestamp is older than 5 minutes.
Event types
payment.succeededA sale reached approved.payment.failedA sale reached declined or error.refund.succeededA refund cleared the acquirer.dispute.openedA chargeback was raised.settlement.paidA daily batch was paid to the bank.terminal.onlineA previously offline device reconnected.terminal.offlineA device has missed 3+ heartbeats.firmware.updatedA device successfully upgraded firmware.