What they are
Besides template events and the channel disconnection notice, the workspace global webhook can receive two groups of account events:- Billing: payment declined, payment recovered, subscription canceled, instance suspended and instance released for non-payment.
- Meta account restriction (
ACCOUNT_RESTRICTION): Meta restricted the WhatsApp Business account (WABA), recorded a violation or scheduled its deactivation.
How to subscribe
Add the events toevents when you create or update the global webhook:
- Global webhook only. Channel webhooks and the instance default webhook reject these events with
422. DEFAULTformat only. The global webhook is alreadyDEFAULT.- Each event is independent. Subscribe only to the ones you use, with or without template events and
CHANNEL_DISCONNECTED. - In the dashboard, subscribing to a billing event requires the See billing permission (Owner and Manager, see Team and roles).
- A
PATCHwitheventsreplaces the list. To keep receiving them, send the events that were already subscribed again.
Billing events
What your server receives
The body is the event:instanceIdslists the instances covered by the invoice. One invoice can cover more than one.invoiceRefidentifies the invoice and is the same on failure and recovery. With two invoices failing in the same workspace, it tells which one was paid.amountis decimal text ("99.90") andcurrencyis the uppercase ISO 4217 code. On failure,amountis the amount due; on recovery, the amount paid. When the recovery comes from a subscription status change, and not from paying an invoice,amountandcurrencyarenull, and so isinvoiceRefif there is no invoice.attemptCountis the charge attempt number, andnextAttemptAtis the next automatic attempt, ornullwhen there is none.
The body never carries card data, payment provider ids, invoice link, email or name.
Meta account restriction (ACCOUNT_RESTRICTION)
Sent when Meta reports one of these situations on the WhatsApp Business account (WABA) of your channels:
The restriction does not disconnect the channel and does not change its state in Omni Z-API. When Meta actually disconnects the account, the channel disconnection notice also arrives, one per channel.
What your server receives
The
restriction_info, ban_info and violation_info blocks are passed on as Meta sends them, untranslated. The possible values, such as restriction_type and waba_ban_state, are in Meta’s documentation and may change. The event object may also carry other routing fields that are not part of the contract: ignore the ones not in this table.One notice per workspace
- One account, one notice. The restriction belongs to the account, so the workspace receives one notice with the
instanceslist, not one notice per channel. - Per number. If Meta mentions different numbers (for example, call restrictions), one notice is sent per number, each with its own
phone_numberandnotice_id. - Repetition. A Meta resend can produce a second notice with the same
notice_id. The same situation reported again by Meta at another moment produces a differentnotice_id.
Order and repetition
Delivery is at least once and arrival order is not guaranteed (see Delivery and retries):- discard repetitions by
id(billing) or bynotice_id(restriction); - order by
occurredAt(billing) or bymoment(restriction), not by arrival time.