API & webhooks

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 four customer.vat_id.… events – can only be subscribed via the API; there, besides individual names, * and groups such as customer.* are also available.
New endpoint dialog with URL field and event checkboxes
New webhook endpoint: URL, optional authentication and the event selection

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.updated event 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

← Back to Support

Related articles

API & webhooks

Importing data via the REST API

Overview When migrating to Kyvento from another system, you transfer your customers and active subscriptions via the Kyv...

API & webhooks

Verifying a webhook endpoint

Overview Kyvento delivers webhook events exclusively to verified endpoints. Verification establishes that the configured...

API & webhooks

Setting up the Stripe webhook

Overview A webhook is Stripe's way of reporting back to Kyvento: whenever something happens in Stripe that Kyvento needs...