Credits depleted
Fires when a signal takes the credits it could draw on in a credits currency (the customer's, and the seat credits of the user who sent it, valid at the signal's time) from above zero to zero or below: the signal that used their last included or granted credit. It fires again only once their credits have been topped up or renewed and run out again. Usage from then on is overage, billed at their plan's price per extra credit. It fires only for usage as it happens: replays of past usage, and backfilled signals more than a week old, send no credit events. data.credits is the balance just after that signal, with the orderId whose charge spent the credits and the signalId.
Headers
- Type: stringX
- Webhook - Signature requiredt=<timestamp>,s=<signature>.tis when the delivery was signed, in Unix milliseconds; each attempt is signed afresh, so a retry has a newt.sis the Base64 (standard alphabet, padded) HMAC-SHA256 of the string<t>.<raw request body>, keyed with your signing secret: the wholewhsec_…string as UTF-8. To verify, recompute it over the raw body exactly as received and compare in constant time, then reject attoo far from now (5 minutes is a good limit) so an old delivery can't be replayed.scan end in=, so split each part on its first=only.
Body
Every delivery's body.
- Type:datarequiredProperties: 1
The event's payload, under the key the event names.
- enumeventconst:billing-credits-depletedrequired
A billing event you can receive.
billing-invoice-paid,billing-invoice-posted,billing-invoice-refunded,billing-checkout-created,billing-checkout-completed,billing-checkout-expired,billing-payment-succeeded,billing-payment-failed,billing-credits-depleted,billing-overage-incurredandbilling-credit-cap-reached; each is described in the Webhooks section.values- billing
-invoice -paid - billing
-invoice -posted - billing
-invoice -refunded - billing
-checkout -created - billing
-checkout -completed - billing
-checkout -expired - billing
-payment -succeeded - billing
-payment -failed - billing
-credits -depleted - billing
-overage -incurred - billing
-credit -cap -reached
- billing
- Type: stringidrequired
The delivery's ID (
whd_…), the same on every retry of it: keep the IDs you've handled and ignore a delivery whose ID you've seen. A test delivery has an ID of its own. - Type: booleanis
Test requiredtruefor a delivery sent with Send a test delivery, whosedatais placeholder;falseotherwise. - Type: stringFormat: date-timetimestamprequired
When the event happened, and the delivery was first queued; the same on every retry.
Responses
- 200
Return any 2xx to acknowledge. Any other status, a redirect (redirects aren't followed), or no answer within 5 seconds is a failed attempt, recorded in the webhook's
lastStatus. A failed delivery is retried 1 minute, 5 minutes, 30 minutes, 2 hours and then 12 hours after each failed attempt in turn (retries are sent by a sweep that runs every minute, so each can be up to a minute later), and dropped after the sixth failed attempt. A retry carries the sameidandtimestampand goes to the webhook's current URL; a delivery whose webhook has since been switched off is dropped. Because of retries, an event can arrive more than once or after a later one: useidto ignore repeats. The response body is ignored.
{
"id": "whd_Lx7Nq3Vb9Tm2Rk5W",
"event": "billing-credits-depleted",
"timestamp": "2026-11-21T15:47:09.826Z",
"isTest": false,
"data": {
"credits": {
"customerId": "cus_Q2x9vB7mK4pT1sLw",
"externalCustomerId": "acme-legal",
"creditsCurrencyId": "cc_jC18u1xkf7CdKYcL",
"currencyKey": "credits",
"currencyName": "Credits",
"available": 0,
"used": 50,
"total": 50,
"periodStart": "2026-11-01T00:00:00.000Z",
"periodEnd": "2026-12-01T00:00:00.000Z",
"orderId": "ord_8Jt3Vw0Ym5Ln2Qp7",
"signalId": "sig_3nV8kQ2xL7pW0tYb"
}
}
}