> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sazabi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Stripe Webhooks

> Send Stripe webhook events to your Sazabi intake URL to search payments, invoices, subscriptions, and disputes as log records, with every delivery's signature verified.

[All Stripe integration capabilities](https://docs.sazabi.com/catalogs/integrations/stripe)

## About

Send Stripe webhook events to Sazabi to search payments, invoices, subscriptions, customers, disputes, and payouts next to the rest of your production telemetry. Stripe posts each event to your Sazabi intake URL as a JSON `POST`, signed with the endpoint's signing secret. There is no agent to deploy, and Sazabi never calls the Stripe API.

### What Sazabi records

Each Stripe event becomes one Sazabi record that keeps the full event, timestamped when Sazabi receives it, so a retry days later still lands. The event's original time is kept as an attribute. These attributes are extracted for filtering:

| Attribute | Stripe field |
| - | - |
| `stripe.event.id` | `id` |
| `stripe.event.created` | `created` |
| `stripe.event.type` | `type` |
| `stripe.event.livemode` | `livemode` |
| `stripe.event.api_version` | `api_version` |
| `stripe.event.account` | `account` |
| `stripe.object.id` | `data.object.id` |
| `stripe.object.type` | `data.object.object` |
| `stripe.request.id` | `request.id` |
| `stripe.request.idempotency_key` | `request.idempotency_key` |

## Prerequisites

* A Stripe account where you can manage webhook endpoints.
* The endpoint's signing secret (`whsec_…`). Stripe shows it only after the endpoint exists, so create the endpoint first. Any placeholder URL works until you have your Sazabi intake URL.
* Your Sazabi intake URL.

> [!NOTE]
>
> Signature verification is in early access. While it is on for your organization, Sazabi asks for the verification secret before it creates the intake URL, and rejects any delivery whose signature does not match. Contact support to turn it on.

## Set up in the dashboard

**Step 1**

### Create the endpoint in Stripe

In the [Stripe Dashboard](https://dashboard.stripe.com/webhooks), open **Developers > Webhooks** and add an endpoint. Give it any placeholder URL for now, choose the events to send, and save. Then reveal the endpoint's **Signing secret**.

**Step 2**

### Add the log source

In the Sazabi dashboard, open **Settings > Log sources**, choose **Stripe Webhooks** and add it. If Sazabi asks for a verification secret, paste the signing secret from Stripe. Sazabi then shows your intake URL.

**Step 3**

### Point the endpoint at Sazabi

Back in Stripe, open the endpoint and set its **Endpoint URL** to your Sazabi intake URL. Save.

## Set up with the CLI

You can also register the Stripe Webhooks log source with the [Sazabi CLI](https://docs.sazabi.com/reference/cli.md) (installed and authenticated — see [CLI reference](https://docs.sazabi.com/reference/cli/log-sources.md)).

```bash theme={"system"}
printf '%s' "$STRIPE_WEBHOOK_SECRET" | sazabi log-sources create stripe_webhooks --mode manual --verify-signatures stripe --secret-stdin
```

The command prints the intake URL. Paste it into the endpoint's **Endpoint URL** in Stripe. The secret is read from standard input, so it never appears in your shell history.

Run `sazabi log-sources get <log-source-id>` at any time to reprint the endpoint, or `sazabi log-sources list` to see every log source in the project.

## Verify signatures

Stripe signs every delivery with the endpoint's signing secret and sends the result, with a timestamp, in the `Stripe-Signature` header. Sazabi checks the signature on the exact bytes Stripe sent and rejects a delivery with `401` when it does not match or when its timestamp is more than five minutes old. A rejected delivery is not stored and not billed. Each Stripe endpoint has its own signing secret, so create one Sazabi log source per endpoint.

| Sender | Signature header | Secret | Setup |
| - | - | - | - |
| Stripe | `Stripe-Signature` | Stripe creates it; you paste it into Sazabi | In Stripe, open Developers › Webhooks, select the endpoint, reveal its signing secret and paste it here. |

To change the secret later, open the log source in **Settings > Log sources** and choose **Rotate secret**. The previous secret keeps working for 24 hours by default, so Stripe keeps delivering while you update it. The [Intake page](https://docs.sazabi.com/guides/instrument/intake.md) shows rejected deliveries and why.

## Verify

Click **Send test webhook** on the endpoint, or create a test-mode payment or customer. Open the [Intake page](https://docs.sazabi.com/guides/instrument/intake.md) in the Sazabi dashboard and confirm records from the **Stripe Webhooks** source appear. Records typically arrive within a minute or two.

## Troubleshooting

**Stripe reports failed deliveries with `401`** — The signature did not match. Check that the secret in Sazabi is the signing secret of this endpoint, not of another endpoint or of the other mode (test or live), and that nothing between Stripe and Sazabi changes the request body.

**No records after saving** — Confirm the endpoint URL exactly matches your Sazabi intake URL, including the `https://` scheme, and that the endpoint is subscribed to the events you triggered.

## Further reading

> [card] [Intake](https://docs.sazabi.com/guides/instrument/intake.md)
>
> See per-source ingestion volume and health in the Intake page.

> [card] [Webhook Events](https://docs.sazabi.com/catalogs/log-sources/send-to-an-endpoint/webhook-events.md)
>
> Verify signatures and send webhooks from any other platform.

> [card] [Check the webhook signatures](https://docs.stripe.com/webhooks#verify-official-libraries)
>
> Stripe's documentation for the signature Sazabi checks.

> [card] [Event types](https://docs.stripe.com/api/events/types)
>
> Every event type Stripe can send.

> [card] [Log sources](https://docs.sazabi.com/catalogs/log-sources.md)
>
> Browse the full log source catalog.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.