Real-time Webhooks
Webhooks allow your application to receive real-time HTTP POST notifications whenever an Ohio sales tax event occurs. Instead of continuously polling the Rate API, our event dispatcher notifies your servers within seconds of state publication.
Supported Events
| Event Name | Trigger |
|---|---|
rate.changed | An Ohio county sales tax rate change becomes legally effective. |
rate.announced | Ohio Department of Taxation officially releases an upcoming quarter's rate schedule. |
certificate.expiring | A customer exemption certificate is 30 days or 7 days from statutory expiry. |
filing.due | Upcoming filing deadline reminder for Ohio UST-1 sales tax returns. |
* | Wildcard: subscribes to all platform events. |
Webhook Management API
1. Register Webhook Endpoint (POST /api/v1/webhooks)
Register an HTTPS endpoint to receive event dispatches. Only organization owners and admins can register endpoints.
curl -X POST "https://app.ohiosalestaxcalculator.com/api/v1/webhooks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://api.yourdomain.com/webhooks/ohio-tax",
"events": ["rate.changed", "certificate.expiring"]
}'
Response (201 Created)
{
"webhook": {
"id": "wh_90b1c2_34ef",
"url": "https://api.yourdomain.com/webhooks/ohio-tax",
"secret": "whsec_0123456789abcdef0123456789abcdef",
"events": ["rate.changed", "certificate.expiring"],
"status": "active",
"created_at": "2026-10-03T18:00:00Z"
},
"message": "Webhook registered successfully. Save the signing secret to verify payload signatures."
}
2. List Registered Webhooks (GET /api/v1/webhooks)
Retrieve all active webhook subscriptions registered for your organization.
curl -X GET "https://app.ohiosalestaxcalculator.com/api/v1/webhooks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
Response (200 OK)
{
"webhooks": [
{
"id": "wh_90b1c2_34ef",
"url": "https://api.yourdomain.com/webhooks/ohio-tax",
"events": ["rate.changed", "certificate.expiring"],
"status": "active",
"created_at": "2026-10-03T18:00:00Z",
"updated_at": "2026-10-03T18:00:00Z"
}
],
"total": 1,
"supported_events": [
"rate.changed",
"rate.announced",
"certificate.expiring",
"filing.due",
"*"
]
}
3. Delete Webhook Endpoint (DELETE /api/v1/webhooks?id={id})
Permanently delete a registered webhook subscription. Subsequent events will no longer be dispatched to this URL.
curl -X DELETE "https://app.ohiosalestaxcalculator.com/api/v1/webhooks?id=wh_90b1c2_34ef" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
Response (200 OK)
{
"success": true,
"message": "Webhook deleted."
}
Event Payload Format
Every webhook payload delivered to your destination URL follows standard event envelope formatting:
{
"id": "evt_test_7f9c21b0",
"type": "rate.changed",
"created_at": "2026-10-03T18:00:00Z",
"data": {
"county": "Warren",
"county_slug": "warren",
"old_rate": 0.0675,
"new_rate": 0.0725,
"effective_date": "2026-10-01",
"lead_days": 0,
"days_until": 0
}
}
Standard Headers
Every webhook dispatch includes standard delivery headers:
X-Webhook-ID: Unique event identifier (e.g.evt_...).X-Webhook-Timestamp: Integer unix epoch timestamp.X-Webhook-Signature: HMAC-SHA256 signature int={timestamp},v1={hex_hash}format.Content-Type:application/json.User-Agent:OhioSalesTaxCalculator-Webhook/1.0.
Delivery, Retry & Timeout Policy
To ensure high reliability without overloading receivers, our dispatcher operates on strict delivery rules:
- Timeout: Your webhook endpoint must acknowledge the request within 5 seconds (5,000ms).
- Success Criteria: Any HTTP response code in the
2xxrange (200–299) is treated as a successful receipt. - Automatic Retries: If your server returns an HTTP status outside
2xx(e.g.500 Internal Server Error,502 Bad Gateway,503 Service Unavailable,429 Too Many Requests) or experiences a connection/socket timeout, our dispatcher queues the delivery for automatic retry with exponential backoff:- Attempt 1: Immediate
- Attempt 2: 1 minute after initial failure
- Attempt 3: 15 minutes later
- Attempt 4: 1 hour later
- Attempt 5: 6 hours later
- Attempt 6: 24 hours later
- Permanent Failures: Responses with
410 Goneor404 Not Foundare treated as intentionally removed endpoints and will not be retried. - Endpoint Suspension: If an endpoint fails all 6 delivery attempts consecutively over a 24-hour period, it is marked
degraded. An automated notification is sent to your workspace administrators.
Event Deduplication & Idempotency
Because webhooks operate with an at-least-once delivery guarantee, network partitions or transient connection hiccups may occasionally trigger a retry of an event your server already received.
Always design your webhook receiver to be idempotent:
- Log the unique
event.id(orX-Webhook-IDheader) in your database before processing. - If an event with the same ID has already been processed, return
200 OKimmediately without re-executing business logic (e.g., updating database rates or sending customer emails twice).
app.post("/webhooks/ohio-tax", async (req, res) => {
const event = req.body;
// Check if event has already been handled
const alreadyHandled = await db.processedEvents.findUnique({
where: { id: event.id }
});
if (alreadyHandled) {
return res.status(200).json({ received: true, duplicate: true });
}
// Record event ID before running side-effects
await db.processedEvents.create({ data: { id: event.id, processedAt: new Date() } });
// Handle business logic
await handleOhioTaxEvent(event);
return res.status(200).json({ received: true });
});