Overview
The Stripe Webhook source receives events from your Stripe account at a dedicated HTTPS endpoint and routes each event to a Kafka topic based on its resource type (customers, payment intents, charges, invoices, subscriptions, products, prices, payouts, refunds, etc.). You point Stripe at the Streamkap-generated webhook URL, register the events you care about, and Streamkap takes care of parsing, key extraction, schema inference, and routing. For initial loads or ad-hoc backfills, the source can also snapshot data directly from the Stripe REST API using your Stripe secret key.This connector is in Beta. Behaviors and defaults may change before general availability.
Prerequisites
- A Stripe account with Administrator access (required to manage webhooks and API keys).
- Your Stripe Secret key (
sk_live_xxxfor production orsk_test_xxxfor test mode), available at dashboard.stripe.com/apikeys. - A Streamkap workspace with permission to create source connectors.
- A clear list of the Stripe resources you want to capture (customers, payment intents, invoices, etc.).
How It Works
- Endpoint provisioning — When you create the source, Streamkap generates a unique HTTPS webhook URL and an API key.
- Stripe subscriptions — In Stripe Workbench, you register a webhook destination pointing at the Streamkap URL with the API key passed as a query parameter, and select the events to deliver.
- Event-type routing — Each incoming request carries an event in its JSON body with a
typefield (customer.created,payment_intent.succeeded, etc.). The Stripe payload router takes the first segment as the resource —customer.*events go to thecustomertopic,payment_intent.*events go topayment_intent, and so on. The connector extractsdata.objectas the Kafka record value. - Key extraction — The router pulls the resource
id(e.g.cus_abc123,pi_xyz789) fromdata.objectand uses it as the Kafka message key, enabling upsert-style consumption downstream. - Signature verification (recommended) — When you provide the Stripe signing secret (
whsec_xxx), each payload is verified against theStripe-Signatureheader using HMAC-SHA256. Invalid payloads are rejected and (if configured) routed to the DLQ. - Optional fan-out — Stripe’s list objects (line items, refunds, subscription items) can be fanned out into their own topics.
- Optional snapshot — For initial loads or ad-hoc backfills, the source queries the Stripe REST API with cursor pagination and emits records alongside the live webhook stream.
Streamkap Setup
1. Create the Source
- Navigate to Sources and choose Stripe.
- Give the source a memorable Name (for example,
stripe-prod).
2. Connection Settings (Auth tab)
3. Schema (Stripe Resources)
In the Schema tab, choose the resources you want to capture. The default iscustomer,payment_intent,charge,invoice.
A resource is the first segment of the Stripe event type field — for example customer.created, customer.updated, and customer.subscription.created all map to the customer resource. Each resource becomes a Kafka topic of the same name.
The dropdown is pre-loaded with the resources most commonly used in billing / SaaS CDC scenarios:
Any fan-out topics you configure (see Fan-out) are added automatically.
Advanced — other Stripe resources. Stripe has many more event types than listed above (Issuing, Financial Connections, Identity, Treasury, Climate, Terminal, etc.). The Schema field accepts any resource name — just type the first-segment of the Stripe event type and Streamkap will route it.
Snapshot support is narrower than webhook routing. Only
customer, charge, payment_intent, invoice, subscription, product, price, payout, refund, payment_method, balance_transaction, coupon, plan, and setup_intent can be snapshotted via the Stripe REST API. All other resources stream via webhooks only.4. Settings
5. Save and Copy the Endpoint
Save the source. Copy the Webhook URL and API Key — you will need them in the next section to configure Stripe.Stripe Setup
Stripe does not support custom headers on webhook deliveries. Pass the Streamkap API key in the destination URL as a query parameter:1. Get Your API Keys
- Go to dashboard.stripe.com/apikeys.
- Copy your Secret key (
sk_test_xxxfor test mode,sk_live_xxxfor production). - Use the toggle at the top of the dashboard to switch between test and live mode.
- Paste the Secret key into the Streamkap source’s Stripe API Key field in the Auth tab — this lets Streamkap call the Stripe REST API when you run a snapshot.
2. Register the Webhook in Workbench (recommended)
Note: Stripe replaced the old “Developers → Webhooks” page with Workbench. New accounts use Workbench by default.
- Go to dashboard.stripe.com and open Developers → Workbench (or dashboard.stripe.com/webhooks).
- Click Add destination (or Create new destination).
- Enter your endpoint URL:
https://<webhook-url>?api_key=<API_KEY>using the values copied from Streamkap. - Important — choose the “Snapshot” payload format, NOT “Thin” payload. Streamkap requires the full resource object in
data.object. Thin-payload events (events whoseobjectisv2.core.event) are not supported and should be left unselected. - Select the events you want to deliver. Recommended starting set:
- Click Create.
- Open the destination’s detail page and copy the Signing secret (
whsec_xxx). Paste it into Streamkap’s Signing Secret field in the Auth tab.
2 (Alternative). Register the Webhook via the Stripe API
For scripted setup, use curl with your Secret key:secret field (whsec_xxx) — copy it into Streamkap’s Signing Secret field.
Or subscribe to all snapshot-payload events:
Local Testing with the Stripe CLI
whsec_xxx signing secret on startup — paste it into Streamkap’s Signing Secret field. Trigger test events with:
Event Routing Reference
The payload router inspects the eventtype field on each incoming request and routes by the first segment.
Events whose action ends in
.deleted set __deleted: true on the output record so downstream sinks can issue tombstones. __op is emitted as a Kafka header (c create, u update, d delete, r snapshot).
Each record additionally carries __changeType (CREATE, UPDATE, DELETE, SUCCEEDED, FAILED, REFUNDED, PAID, FINALIZED, SNAPSHOT, …) in the value.
Fan-out
Stripe resources contain nested list objects ({object: "list", data: [...]}) for line items, refunds, and subscription items. Most warehouse destinations can’t store these cleanly as a single column. Fan-out emits one record per list element to a dedicated topic so each child becomes its own row.
Set Fan-out Fields to a comma-separated list from the allowed set:
Fan-out topics are added to the Schema list automatically — you do not need to register them manually.
Each fan-out record contains the list element’s fields plus a
_ctx_event_id for correlation back to the parent Stripe event.
Signature Verification
Stripe signs every webhook with HMAC-SHA256. Streamkap parses theStripe-Signature header (t=timestamp,v1=hex_signature) and verifies the payload against the signing secret you provide.
To enable verification, paste your destination’s signing secret (whsec_xxx) into the Auth tab’s Signing Secret field. The connector checks all v1 signatures sent during secret rotation, so you can rotate without downtime.
Leave the field empty only when testing — anyone who knows the connector URL could otherwise submit fake events.
Snapshot
Once your source is live, you can run a snapshot from the Streamkap UI to load historical data for selected resources. Webhook streaming continues to run in parallel — snapshot is a one-time backfill, not an alternative to live events.Snapshottable Resources
Only these resources can be snapshotted via the Stripe REST API:
All other resources you select in the Schema tab (
checkout, quote, credit_note, transfer, etc.) cannot be snapshotted — they only receive live events via webhooks once you register them in Stripe. This is a limitation of the Stripe REST API, which exposes historical-fetch endpoints only for the resources above.
Troubleshooting
Limitations
- The Stripe Webhook source is currently Beta.
- Stripe expects a
2xxresponse promptly. The connector responds immediately and processes asynchronously; failures are captured in the DLQ when enabled. - Snapshot supports only the 14 resources listed above. Other resources (
checkout,quote,credit_note,transfer, etc.) are streamed via webhooks only. - Only Stripe’s Snapshot (v1) payload format is supported. Thin payloads (
v2.core.event) are not processed. - Stripe does not guarantee event ordering. Use the
_event_createdtimestamp for ordering and_event_idfor deduplication. - Maximum payload size is 50 MB and maximum header size is 64 KB.
- The connector runs as a single task; horizontal scaling requires multiple source instances.
See Also
- Webhook Source — generic webhook source for any HTTP-capable producer.
- Zendesk Webhook — Zendesk-specific webhook source.
- Salesforce CDC — Salesforce CDC + Apex-trigger webhook source.
- Shopify Webhook — Shopify-specific webhook source.