Skip to content
Last updated

Webhooks

Acme Billing sends an HTTPS POST request to your endpoint when an invoice changes. Add an endpoint in the Acme Billing dashboard, under Settings > Webhooks, and select the events that you want.

Sandbox

The sandbox does not send webhooks.

Events

EventWhen it fires
invoice.paidAcme captured a payment for the full amount due, and the invoice became paid.
invoice.payment_failedThe last scheduled retry of a card payment failed. The invoice stays unpaid, and Acme stops retrying.
invoice.voidedSomeone voided the invoice in the dashboard or with the API.

invoice.payment_failed does not fire for each failed attempt. It fires once, after the third retry fails. For the retry schedule, see Invoice lifecycle.

Payload

Every event has the same envelope. data holds the invoice as the API returns it, after the change.

invoice.payment_failed
{
  "object": "event",
  "id": "evt_4Hs7Kq2Xb",
  "type": "invoice.payment_failed",
  "createdAt": "2026-11-02T14:05:40Z",
  "data": {
    "object": "invoice",
    "id": "INV-2041",
    "customerId": "cus_N8w2Lq7Tz",
    "customerName": "Northwind Traders",
    "status": "unpaid",
    "currency": "usd",
    "total": 320000,
    "amountPaid": 0,
    "amountDue": 320000,
    "dueDate": "2026-10-21",
    "pastDue": true,
    "nextRetryAt": null
  }
}

The example shortens data. A real event has every invoice field.

Verify the signature

Every request has an Acme-Signature header:

Acme-Signature: t=1793628340,v1=5b1f0c6c3e0a2d8f9e4b7a1c6d3e2f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e
  • t is the Unix time when Acme sent the request.
  • v1 is the HMAC-SHA256 of {t}.{raw request body}, signed with the signing secret of the endpoint, in hexadecimal.

To verify a request:

  1. Read t and v1 from the header.
  2. Compute the HMAC-SHA256 of t, a period, and the raw request body, with your signing secret.
  3. Compare the result with v1 in constant time.
  4. Reject the request if t is more than 5 minutes old.

Find the signing secret of each endpoint on the Settings > Webhooks page.

Respond and retry

Return a 2xx status within 10 seconds. If your endpoint returns another status or times out, Acme retries the request with exponential backoff for up to 3 days. Use the event id to ignore a request that you already processed.