Configuring webhooks
Overview
Webhooks reverse the flow of information: instead of having your systems ask for changes at regular intervals, Kyvento reports events β new subscriptions, paid invoices, failed payments β immediately via HTTP POST to your URL. This article shows the setup, event selection and signature verification.
Creating an endpoint
Open Settings β "Webhooks" (the "Integration" group) and click "New Endpoint":
- "Name (optional)": for example "ERP integration" β to recognize it in the list.
- "Delivery method": "HTTP endpoint (URL)" β the route this article describes β or "Email notification": one email per event, with the event data attached, goes to an address you first confirm via a confirmation link.
- "Endpoint URL": your receiver's address β use HTTPS (Kyvento also accepts
http://, so it does not enforce HTTPS). Kyvento rejects private and internal network addresses for security reasons. - "Authentication & Headers (optional)": if needed, basic-auth credentials and your own HTTP headers, which Kyvento sends along with every delivery. The section is collapsed and only visible with the "Advanced Settings" permission.
- "Events": the event types this endpoint should receive, via checkbox β or "Select all". This selects the events the dialog offers; event types added later are not subscribed automatically. Some types β such as
shipment.*,coupon.*and the fourcustomer.vat_id.β¦events β can only be subscribed via the API; there, besides individual names,*and groups such ascustomer.*are also available.
After creation, Kyvento shows the signing secret (prefix whsec_) only once β store it securely in your receiver application, you need it for signature verification. If it gets lost, generate a new one in the endpoint's menu via "Regenerate signing secret"; the previous one stops working immediately. Email endpoints have no secret.
Verifying the endpoint
Before events start to flow, it has to be proven that the address entered is yours: Kyvento sends a check value to the URL once, and your server must return it unchanged with status 200. As long as this proof is missing, the endpoint carries the "Not verified" badge and receives no deliveries β not even when it is active; events from that time are not delivered later either. After every change to the endpoint URL the proof has to be provided again. The full procedure with an example delivery and example response is described in Verifying a webhook endpoint.
The most important event groups
- customer.* β customer created, updated, deleted (the likewise selectable
customer.payment.method.updatedevent is currently not triggered) - subscription.* β subscription created, renewed, paused, cancelled, trial converted or ending soon, plan changed
- invoice.* β invoice finalized, paid, partially paid, overdue, cancelled
- payment.* β payment succeeded, failed, refunded, direct debit returned
- dunning.* β dunning level escalated, dunning paused/resumed
- test.ping β the sample event for connection tests; it is never triggered on its own, only via "Send test", and there it reaches every verified endpoint, even without a subscription
Structure of a delivery
Every delivery is a JSON POST with a stable envelope: id (event ID), type, created, account (your account's public identifier, org_β¦), data.object (the affected object) and, for changes, previous_attributes. It comes with the headers X-Kyvento-Event (type), X-Kyvento-Delivery-Id (unique per delivery β on retries of the same delivery the ID stays the same, so your receiver can detect duplicates by it; the attempt counter runs separately) and the signature.
Verifying the signature (strongly recommended)
The header X-Kyvento-Signature has the form t=<timestamp>,v1=<signature>. The signature is an HMAC-SHA256 over the string timestamp.request-body with your signing secret as the key. Check both: signature correct and timestamp no older than 5 minutes β this way you reject forged and replayed deliveries.
Testing the connection
The "Send test" action immediately sends a sample event to your URL β ideal for checking reachability and processing before real events flow. A test can only be sent once the endpoint is verified; the dialog shows a preview of the request with headers and signature even before that. The test delivery takes the same path as a genuine one and therefore carries the same signature β so you can test your signature verification with it directly. You can recognise it by the additional header X-Kyvento-Test: 1 and the test field in the body; it does not appear in the delivery history.
Next steps
- Prove control over the endpoint address β see Verifying a webhook endpoint
- Delivery retries and error diagnosis β see Webhook retry and error handling
- Interplay with the REST API β see API documentation and examples