Event Webhooks Overview
Event Webhooks let your account receive real-time HTTP notifications when
something changes in Ziptax, instead of polling the API. When a subscribed
event occurs, Ziptax sends an HTTP POST request with a JSON body to each
endpoint URL your account has configured.
The webhook body is only a notification that something changed. It does not
carry the changes themselves. For rate.updated, the payload tells you which
tax authority changed (and, at Postal code granularity
on Enterprise plans, which postal codes were affected). When you receive it,
call the Ziptax rate API to fetch the updated rates for
that authority.
How it works
You configure one or more endpoints
Add the HTTPS URLs that should receive notifications from your account’s Develop > Events page.
A subscribed event occurs
For example, sales tax rates change for a tax authority you care about.
Ziptax delivers the event
Ziptax sends an HTTP POST with a JSON body to every configured endpoint.
Your endpoint acknowledges, then acts
Respond quickly with a 2xx status, then fetch the authoritative data from the Ziptax API.
When to use webhooks
Use Event Webhooks when you want to react to changes as they happen without
running a polling loop against the API. The current use case is keeping your
own cached rates fresh: subscribe to rate.updated and re-fetch rates for an
authority only when it actually changes.