Webhooks and events
The events Abazi emits, how webhook deliveries are signed and retried, and how to verify, replay and debug them.
Events you can subscribe to
Each event has its own page with when it fires and an example payload.
| Event type | Data fields |
|---|---|
| mandate.activated | mandate_id, version, hash |
| payment.confirmed | intent_id, receipt_id, settlement_ref, amount, asset, network, rail, merchant_id, payee |
| delivery.delivered | intent_id, http_status, receipt_id |
| delivery.failed | intent_id, http_status, receipt_id |
| payment.denied | intent_id, reason_code |
| approval.requested | approval_id, intent_id, approval_url, expires_at |
| mandate.revoked | mandate_id, agent_ids, revocation_receipt_id |
| merchant.tier_changed | merchant_id, from, to, cause |
| card.authorization.decided | — |
| plan.activated | — |
| installment.paid | plan_id, plan_payment_id, seq, amount, receipt_id |
| installment.failed | plan_id, plan_payment_id, seq, amount, error |
| plan.cancelled | plan_id, cancelled_by, pulls_done, released_base_units |
| plan.completed | — |
| dispute.opened | dispute_id, receipt_id, reason |
| refund.settled | refund_id, amount, refund_receipt_id |
| payout.settled | — |
| test.event | — |
Envelope: id, type, created_at, api_version, org_id | merchant_id, data. Signing: Standard Webhooks: webhook-id, webhook-timestamp, webhook-signature (v1,<base64 HMAC-SHA256 of id.timestamp.body>).
Signing
Deliveries follow the Standard Webhooks scheme. Each request carries three headers:
| Header | Content |
|---|---|
webhook-id | The event id; the same on every retry of that event, so you can de-duplicate. |
webhook-timestamp | Unix seconds when the attempt was sent. Reject old timestamps to stop replays by a third party. |
webhook-signature | v1,<base64 HMAC-SHA256> over id.timestamp.body, keyed with your endpoint's signing secret. |
The signing secret starts with whsec_ and is shown once when you create the endpoint. You can rotate it at any time.
Verify every delivery before you act on it. In Python:
import base64, hashlib, hmac
def verify(secret: str, msg_id: str, timestamp: str, body: bytes, header: str) -> bool:
key = base64.b64decode(secret.removeprefix("whsec_"))
signed = f"{msg_id}.{timestamp}.".encode() + body
expected = base64.b64encode(hmac.new(key, signed, hashlib.sha256).digest()).decode()
return any(hmac.compare_digest(expected, part.split(",", 1)[1])
for part in header.split() if part.startswith("v1,"))Retries
A delivery that does not get a 2xx answer is retried up to seven more times: after 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 10 hours. After the last attempt it is marked dead. Each attempt, with its response code, is kept and visible in the Console.
| From | Can move to |
|---|---|
| pending | delivered, retrying |
| retrying | delivered, dead, retrying |
Replay and test
- Replay any event to one endpoint or to all, for example after fixing a handler.
- Send a test event to a new endpoint to check your signature verification before real events arrive.
- Request logs keep API and MCP calls for seven days, redacted.
