- Email, to the addresses you choose.
- Your dashboard, as a list (see Partner Dashboard). The API returns the same list.
- Your own system, as a signed
POSTto an address you set (a webhook), so that your code can act on it: mark an invoice paid, warn your team that credits are low.
What a notification holds
Every notification has atitle (one line), a body (a few sentences that say what happened and what to do about it), a tone (info, success, warning or error) and its facts in data, named in camelCase.
What is in data depends on the event. Each event has a page in the API reference with its fields and an example: for instance invoice.paid, credits.low and partner.paused.
Read your notifications
GET /partners/{partnerId}/notifications lists them, the newest first. A page holds limit notifications (20 by default, at most 100). When there are older ones, nextBefore is set: ask again with it as before.
partner:read scope when your key is limited to some scopes (see Authentication).
Choose where they go
GET /partners/{partnerId}/notifications/settings returns where your notifications go now, and events, every kind of event there is, for a settings screen. PUT on the same address changes it. A key you leave out of the body stays as it was, so send only what changes.
Changing the settings needs an API key with full access, because they decide where your notifications go. Reading them does not.
The first time you set a webhook address, the answer carries the signing secret. Partner webhooks shows what a call looks like, how it is answered and tried again, and how to rotate the secret.
In your dashboard, the Notifications tab has the same controls: under the webhook settings, a Send a test event box sends the event you choose to your saved address and says in words what your receiver answered and what to try (see Send a test event), and every webhook delivery in the list has a Send again button (the replay described below).
See what was sent
GET /partners/{partnerId}/notifications/deliveries lists the sends of your notifications, the newest first: each email to one address and each call to your webhook. It tells you whether it was delivered, when it is tried again, how many attempts it had, the HTTP status your webhook answered with, and why the last attempt failed. Use it to find out why an event did not reach you.
status is pending, delivered, failed or cancelled. target is the address of an email, or only the host of your webhook, because the whole address may hold a token. lastError is a few words from Widgetic, never what your endpoint replied.
An email counts as delivered when it was handed to the mail service. A webhook call counts as delivered when your endpoint answered 2xx.
To send one webhook delivery again, for example after you fixed your receiver, call POST /partners/{partnerId}/notifications/deliveries/{deliveryId}/replay, with an Idempotency-Key. It sends the event to your current address with the same webhook-id as the original, so a receiver that remembers ids can ignore a duplicate, with a new createdAt and a signature made with your current secret. The attempt is recorded as a new row that points at the delivery you replayed. A handful of replays a minute is enough for this, and more are refused with 429. It needs an API key with full access.
Errors
Partner webhooks
Set an address, answer a call, rotate the secret
Credits & Billing
How invoices, tax and reminders work
Account Status
Activation, pauses, unpaid invoices and what each one stops