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

# Develop against real Stripe webhooks locally

> Capture verified Stripe webhooks on a permanent URL and forward them to your dev server, replaying any event as often as you like.

Point Stripe at a permanent, signed ingest URL, verify every event's signature, and forward the live stream to `localhost` — then replay any captured event into your handler as many times as it takes. No re-triggering charges in the Stripe dashboard, no tunnel that dies when your laptop sleeps.

<Steps>
  <Step title="Create an endpoint and grab its ingest URL">
    The ingest URL is permanent and stays visible in your dashboard.

    ```sh theme={null}
    wbhk endpoints create stripe-dev
    # → ingest URL: https://wbhk.my/whep_...
    ```
  </Step>

  <Step title="Register your Stripe signing secret">
    Now events arrive with a `verificationState` of `verified` instead of `unattempted`. The secret is read from stdin, never a shell argument.

    ```sh theme={null}
    wbhk endpoints add-provider-secret <endpoint-id> --provider stripe
    # paste whsec... at the prompt
    ```

    Point a Stripe webhook endpoint at `https://wbhk.my/<token>` and send a test event. See [verify inbound signatures](/guides/verify-inbound-signatures) for the details.
  </Step>

  <Step title="Forward the live stream to your dev server">
    `listen --forward` re-delivers each captured event to your local URL, cursor-gated at least once. Reconnects resume from the durable cursor, so a dropped wifi connection doesn't lose events.

    ```sh theme={null}
    wbhk listen <endpoint-id> --forward http://localhost:3000/webhooks --since now
    ```
  </Step>

  <Step title="Replay while you iterate">
    Broke your handler on `invoice.paid`? Don't fish in the Stripe dashboard — replay the one you already captured, editing the body first to exercise an edge case.

    ```sh theme={null}
    wbhk replay <event-id> --forward http://localhost:3000/webhooks --edit
    ```
  </Step>
</Steps>

<Note>
  `--edit` re-delivers modified bytes, so Stripe's original signature won't re-verify against them —
  expected when you're testing your handler's logic rather than its verification. Forward without
  `--edit` to replay the exact signed bytes.
</Note>
