Skip to content

Updating visuals

If you see any images containing outdated UI, please bear with us.

We are updating all content as quickly as possible to mirror our new UI.

Webhooks

Webhooks let your WeWeb backend run workflows when something happens in Stripe—for example when a payment succeeds, a subscription is created, or a checkout session is completed—even when the user is no longer on your site.

What you need

  1. Webhook enabled on your Stripe connection in WeWeb.
  2. A webhook endpoint in the Stripe Dashboard pointing to your WeWeb backend URL.
  3. A backend workflow in WeWeb with a Stripe trigger that matches the events you care about.

Step 1: Enable the webhook in WeWeb

  1. In WeWeb, open Integrations → Stripe and edit your connection (for the environment you use: Editor, Staging, or Production).
  2. Set Stripe Webhook to Enabled.
  3. Set Webhook Path (e.g. /stripe/webhook). The full URL is your backend base URL + api + this path (e.g. https://your-backend.weweb.io/api/stripe/webhook). Use Copy url to copy it.
  4. Leave Webhook Secret Key empty for now; you’ll paste it after creating the endpoint in Stripe.

Step 2: Add the endpoint in Stripe

  1. Go to Stripe Dashboard → Webhooks.
  2. Click Add endpoint.
  3. Endpoint URL — paste the URL you copied from WeWeb (the one that includes api and your path).
  4. Choose which events to send (e.g. checkout.session.completed, payment_intent.succeeded, invoice.paid, customer.subscription.updated). You can add more later.
  5. After saving, Stripe shows a Signing secret (whsec_...). Copy it.

Step 3: Paste the signing secret in WeWeb

Back in your Stripe connection in WeWeb, paste the Signing secret into Webhook Secret Key and save. This lets WeWeb verify that incoming requests really come from Stripe.

Step 4: Create a backend workflow with a Stripe trigger

  1. In WeWeb, create a backend workflow (Data & API or Workflows, depending on your setup).
  2. Set the trigger to a Stripe trigger and choose the one that matches the events you selected (e.g. On checkout session event, On payment intent event).
  3. In the workflow, the Stripe payload is in context.event. The event type (e.g. completed, succeeded) is in context.event.action.
  4. Use a Switch action on context.event.action to branch (e.g. run different logic when action is succeeded vs failed).

Available webhook triggers

TriggerWhen it runsUseful for
On checkout session eventSession completed or expiredGrant access, save order, send confirmation after Checkout.
On payment intent eventCreated, succeeded, failed, or canceledUpdate order status, grant access, retry logic.
On subscription eventCreated, updated, deleted, paused, resumedSync plan status, send emails, provision/revoke access.
On invoice eventCreated, updated, paid, payment_failed, finalizedSend receipts, dunning, renewals.
On charge eventSucceeded, failed, refunded, updatedAnalytics, receipts, refund handling.
On customer eventCreated, updated, deletedSync customer data.
On product eventCreated, updated, deletedSync catalog.
On price eventCreated, updated, deletedSync pricing.

Next: Workflow examples