Skip to content

Integration

Stripe + Bastle

What syncs from Stripe, what it makes possible, and how to connect it.

Beta

This connector works and can be connected today, with edge cases still being closed. Check the first month against the source before you rely on it.

What does the Stripe integration do?

The 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.

What syncs

Bastle reads the following from Stripe and normalises it into the same entities every other source produces. Ingestion is read-only: nothing is created, changed or cancelled upstream.

  • Prices and legacy plans → Bastle plans, with interval and interval count mapped 1:1 (quarterly reads as month × 3). One-time prices are skipped; their charges land in Other Revenue.
  • Customers, subscriptions and subscription items — item one is the base plan and its quantity is seats, remaining items become add-ons priced per interval.
  • Coupons and discounts, flattened to a per-interval discount in cents. A 100% coupon produces a discount equal to the gross, which the metrics engine treats as a churn on apply and an upgrade on expiry.
  • Charges and refunds in integer cents, with the Stripe fee read from the expanded balance transaction during backfill.
  • Delinquency state: invoice.payment_failed sets the customer delinquent, invoice.payment_succeeded clears it.
  • Trial lifecycle as events — trial started, trial converted, trial cancelled — derived from subscription status transitions rather than guessed from dates.
  • Disputes, recorded as activity events for Recover. They do not move MRR.
  • Cadence: webhook-driven, so seconds behind Stripe. Historical backfill is run manually today.

Once connected

What Stripe data unlocks

Connecting a source is not the point; what you can answer afterwards is. These are the questions this data makes answerable.

MRR that reconciles with Stripe

Recurring revenue is normalised per subscription — monthly at face value, quarterly divided by three, annual divided by twelve, less live discounts — so the number can be traced back to the specific subscriptions behind it rather than to a chart.

Failed payments as a working queue

invoice.payment_failed marks the customer delinquent with a timestamp, which is what Recover's dunning campaigns and the delinquency window policy both read from.

Trial conversion measured, not inferred

A trialing subscription becoming active is recorded as a distinct conversion event, so trial conversion rate is counted from transitions rather than reconstructed from trial end dates after the fact.

Fee-aware net revenue

Charges carry Stripe's fee, so net revenue and gross margin work off what actually landed rather than off the gross amount invoiced.

Setup

Connecting Stripe

The whole flow, start to first chart. No implementation call and no data engineer.

  1. Open Settings → IntegrationsThe integrations grid is driven by the connector registry, so every provider Bastle knows about is listed with its real status.
  2. Connect the Stripe accountBastle authenticates server-side with a Stripe secret key. A restricted key with read access is enough — Bastle never writes to Stripe. Credentials are held server-side and never reach the browser.
  3. Point a Stripe webhook at BastleAdd an endpoint in the Stripe dashboard targeting /api/webhooks/stripe with your Bastle source id in the query string, subscribe it to the customer, subscription, invoice and charge event types listed in the connector docs, then save the signing secret in Bastle.
  4. Ask us to run the historical backfillFirst-time imports are triggered by hand while the scheduled runner is being wired. Once it completes, the webhook keeps the account current with no further action.

Why the webhook is the important half

Most analytics tools describe their Stripe integration in terms of the initial import, because that is the part a demo shows. The part that decides whether your numbers are trustworthy in month four is the event stream. Bastle's endpoint verifies the Stripe-Signature header against the endpoint secret before it touches the database, so an unauthenticated request can never trigger a lookup, and the Stripe SDK re-verifies afterwards as defence in depth. Events from a Connect account that does not match the source's pinned account id are rejected with the same generic error as a bad signature, so there is no way to probe which source ids exist.

Where subscription state gets subtle

Two Stripe behaviours cause most of the disagreement between billing dashboards and analytics tools. The first is cancel_at_period_end: a subscription flagged for cancellation is still generating revenue until Stripe actually ends it, so Bastle keeps it active until then and dates the cancellation when it happens. The second is discounts. Percentage coupons apply to the gross of base plus add-ons and are stored as a flat per-interval amount; a 100% coupon produces a discount equal to the gross, and the metrics engine excludes that customer from paid MRR — counting it as churn on apply and an upgrade on expiry. Both rules are policy, and both are written down in the MRR definition rather than buried in a sync job.

Fees, and why backfill sees them and webhooks often do not

Stripe's fee lives on the balance transaction, not on the charge. Backfill expands it, so imported charges carry the real fee. Webhook deliveries usually carry only the balance transaction id, so a charge that arrives live records a fee of zero until the next sync fills it in. Net revenue is therefore slightly optimistic for very recent charges and correct for everything else. That is a real limitation and it is better stated than discovered.

What "beta" means here

The connector is written and the inbound webhook route verifies signatures and writes normalised rows, so a connected account keeps up with changes as they happen. What is not self-serve yet is the historical backfill: the code that walks your provider's API from the beginning exists in the connector, but the scheduled runner that triggers it is still a stub, so first-time imports are run by hand with us. Expect to email someone once during setup, and expect that to stop being true.

Bastle is free while in beta, connectors included. There is no tier that unlocks a provider.

Related

Other sources

Companies billing through Stripe usually have at least one of these in the stack too.

Stripe and Bastle: common questions

What Stripe permissions does Bastle need?

Read access only. A Stripe restricted key with read permissions on customers, subscriptions, prices, charges and refunds is sufficient for both backfill and webhook processing, and it is the recommended configuration because Bastle never writes to Stripe.

How far behind Stripe is Bastle?

Seconds, for anything covered by the webhook — customer, subscription, invoice, charge and dispute events are processed on delivery. Historical data depends on the backfill, which is currently run manually during onboarding rather than on a schedule.

Does Bastle support Stripe Connect platforms?

Partly. A source can be pinned to a specific Stripe account id, and verified events from any other account are rejected, which is the security property a platform needs. Aggregating many connected accounts into one workspace view is not built yet.

Does Bastle write anything back to my billing provider?

No. Bastle reads from your billing provider and never mutates it. It does not cancel subscriptions, apply coupons, retry charges through the provider, or update stored cards. Read-only API credentials are enough for every provider connector, and using them is the recommended setup.

Connect Stripe and see your own history.

Bastle backfills what Stripe will serve, then keeps current over webhooks — usually a couple of minutes before the first real chart. Free while in beta, no card required.