Integration
Webhooks + Bastle
What syncs from Webhooks, what it makes possible, and how to connect it.
This connector ships today. Connect it from workspace settings and Bastle backfills the history the source will serve.
What does the Webhooks integration do?
What syncs
Bastle reads the following from Webhooks and normalises it into the same entities every other source produces. Ingestion is read-only: nothing is created, changed or cancelled upstream.
- Customer events: created, updated.
- Subscription events: created, updated, cancelled.
- Money events: charge succeeded, charge failed, refund created.
- Trial events: started, converted, cancelled.
- Dunning events: recovered, failed.
- System events: import completed, backfill completed.
- Cadence: enqueued as the event is written, drained by a scheduled dispatcher.
Once connected
What Webhooks data unlocks
Connecting a source is not the point; what you can answer afterwards is. These are the questions this data makes answerable.
Normalised events across every source
A cancellation from Stripe, Recurly and the write API arrive in one shape. Anything you build downstream is written once rather than once per provider.
Signed deliveries
Each request carries an HMAC signature over the payload, so a receiver can verify a delivery genuinely came from Bastle before acting on it.
Retries that survive an outage
A failed delivery is retried on an escalating schedule spanning roughly fourteen hours, so a receiver down for a deploy does not silently lose events.
Pattern subscriptions
An endpoint can subscribe to exact types, to a prefix wildcard such as every subscription event, or to everything. An empty subscription list means all events.
Setup
Connecting Webhooks
The whole flow, start to first chart. No implementation call and no data engineer.
- Open Settings → WebhooksEndpoints are managed here, with a preview of recent deliveries and their response codes and latencies.
- Add an endpoint URLBastle POSTs a JSON envelope containing the event id, type, creation time and data payload.
- Choose event typesPick exact types, use a prefix wildcard, or subscribe to everything. Narrow subscriptions mean less traffic and fewer receiver branches.
- Verify the signature on your sideRecompute the HMAC over the raw request body with your endpoint secret and compare in constant time before doing any work.
The gap this fills
Subscription analytics tools generally read data and stop there, which leaves you polling an API to find out that a customer cancelled. Outbound webhooks invert that: Bastle tells you. Because the events are derived after normalisation, they are the same shape regardless of which billing system produced them — a downstream service written against a Bastle cancellation event keeps working when you migrate processors.
Delivery semantics
Deliveries are enqueued when the underlying event is written and drained by a scheduled dispatcher. A failed attempt is retried after one minute, then five, then thirty, then two hours, then twelve, for six attempts in total across roughly fourteen hours. Delivery is at-least-once: a receiver that times out after processing may see the same event again, so key your handlers on the event id.
Verifying a delivery
Every request carries a signature header computed as an HMAC over the raw body with your endpoint's secret. Verify it against the raw bytes — not the re-serialised JSON, which may differ by whitespace or key order — and compare in constant time. A webhook receiver that skips verification is a public write endpoint for anyone who learns the URL.
Choosing what to subscribe to
Subscribing to everything is convenient and usually wrong: most receivers care about two or three types and will branch past the rest. Prefix wildcards are the middle ground when you want a whole family, such as every subscription event, without enumerating each one.
Related
Other sources
Companies billing through Webhooks usually have at least one of these in the stack too.
- Universal APILiveBastle's write API accepts subscription data from any billing system, including one you built yourself. A single batched import endpoint upserts plans, customers, subscriptions, charges and refunds against your own external ids, and a read API returns the same metrics the dashboard renders. It is available today, self-serve, with scoped API keys.
- SlackBetaThe Slack integration answers a slash command with live metric values from your workspace's daily snapshots and formats event alerts and scheduled metric reports as Block Kit messages. Slack never becomes a billing source — it is an output surface, and the slash command is the part that is wired end-to-end today.
- StripeBetaThe Stripe integration turns a Stripe account into Bastle's subscription data model: prices become plans, subscriptions carry their add-ons and discounts, and charges carry the Stripe fee from the balance transaction. Ongoing changes arrive over a signature-verified webhook endpoint within seconds of happening in Stripe, so MRR, churn and failed-payment state track the billing account rather than a nightly export.
- ChargebeeBetaThe Chargebee integration reads a Chargebee site through the v2 API with Product Catalog 2.0 semantics: item prices become plans, subscriptions carry add-ons, and invoices and transactions become charges and refunds in integer cents. Webhooks authenticated with HTTP basic auth keep subscription and dunning state current between imports.
Webhooks and Bastle: common questions
How does Bastle sign webhook deliveries?
What happens if my endpoint is down?
Can I receive an event more than once?
Do webhooks work with the write API as a source?
Connect Webhooks and see your own history.
Bastle backfills what Webhooks will serve, then keeps current over webhooks — usually a couple of minutes before the first real chart. Free while in beta, no card required.