Creating webhooks and verifying deliveries
A webhook sends a signed POST to your URL when Hacienda accepts or rejects an invoice or a purchase arrives; you create it under Company settings → Integrations, copy the secret once, test it and follow each delivery.
If you are not signed in, Tario asks you to log in and opens your current company.
Steps
Open Company settings → Integrations → Webhooks and click New webhook (you need the Settings → manage permission).
Type the Endpoint URL (HTTPS recommended), choose the Events you want (Invoice accepted, Invoice rejected, Bill received) and an optional Description. Confirm with Create.
Copy the signing secret now: it is shown once. Every delivery carries
X-Tario-Event,X-Tario-DeliveryandX-Tario-Signature= HMAC-SHA256 of the raw body with that secret, in hex; verify it against the raw body before parsing.Click Send test event to queue a signed
ping: the Last delivery column shows Queued, Delivered (with the HTTP code), Retrying or Failed with the last error. Tario retries failed deliveries up to 5 times (1 min, 5 min, 30 min, 2 h).Use the Status switch to pause a webhook without deleting it; Delete removes it and drops queued deliveries.
Delivery history is kept for 30 days. The same subscriptions are available over the API (
GET/POST/PATCH/DELETE /api/v1/webhooks) with theupdateability.
Tips
- Answer 2xx quickly and process the event afterwards: a slow endpoint counts as a failure after 10 seconds.
- Use
X-Tario-Deliveryas an idempotency key: a retry repeats the same delivery id. - Invoice events carry
numero_hacienda(the consecutivo),email_delivery(which e-mail Tario sends, if any),hacienda_responded_atand thexml_download_path/xml_response_download_pathroutes to fetch the signed XML and Hacienda's response with your token, for example to build your own PDF.
Common errors
| Code or message | What it means | How to fix it |
|---|---|---|
Turn the webhook on before sending a test event. | The webhook is paused, so nothing is delivered to it. | Turn the Status switch on and send the test again. |
Ask Tario AI
Opens the assistant inside Tario with the question typed, ready to send.
Ask Tario AI