# Webhook reference

Webhooks notify your systems about invoice, payment and subscription events.

## Delivery

Events are delivered as HTTP POST requests with a JSON body. Delivery is
at-least-once; use the event id to deduplicate. A non-2xx response is retried
with exponential backoff for 24 hours.

## Signature verification

Each request includes X-Afriyon-Signature: a hex HMAC-SHA256 of the raw request
body using your webhook secret. Compare it in constant time before parsing.

## Event types

- invoice.issued
- invoice.paid
- subscription.renewed
- subscription.past_due
- ticket.created

## Example envelope

{
  "id": "evt_01J8Z3",
  "type": "invoice.paid",
  "created": "2026-11-12T09:14:00Z",
  "data": { "invoice": "INV-2026-0104", "amount": 129, "currency": "USD" }
}

Respond with 200 within five seconds. Queue slow work asynchronously.
