---
title: Plainrouter Webhooks
description: Stripe webhook setup, authentication, supported events, responses, and operational safety for Plainrouter Signals.
canonical: https://plainrouter.com/webhooks.md
last_updated: 2026-08-26
---

# Plainrouter Webhooks

Plainrouter Signals can receive authenticated Stripe events as server-observed revenue evidence. The webhook path belongs to one workspace and is intended for Stripe, not browsers or general API clients.

## Endpoint

```http
POST /webhooks/stripe/workspaces/{workspace} HTTP/1.1
Host: plainrouter.com
Content-Type: application/json
Stripe-Signature: t=TIMESTAMP,v1=SIGNATURE
```

Use the workspace-specific URL shown during Plainrouter Signals setup. The shorter `/webhooks/stripe/{signalTracker}` path remains a deprecated compatibility alias whose value is the same workspace ID. Configure the Stripe endpoint secret through the authenticated Plainrouter installation flow. Never put the endpoint secret in the URL, request body, browser JavaScript, agent prompt, log, or support message.

To match browser purchases, set metadata.order_id on the Checkout Session to the order ID your site sends.

## Authentication and verification

Plainrouter verifies the raw request body against the `Stripe-Signature` header and the encrypted secret configured for that workspace. Requests with a missing signature, invalid signature, stale verification timestamp, unavailable secret, or secret-decryption failure are rejected before revenue evidence is accepted. The response never returns the configured secret.

## Required Stripe events

- `checkout.session.completed`
- `checkout.session.async_payment_succeeded`
- `invoice.paid`
- `customer.subscription.created`
- `customer.subscription.updated`
- `customer.subscription.deleted`
- `refund.created`
- `refund.updated`
- `refund.failed`
- `customer.created`
- `customer.updated`

`charge.refunded` remains a supported compatibility event. `checkout.session.async_payment_failed` is acknowledged without recording revenue.

Other authentic Stripe event types are acknowledged and ignored. A workspace with inactive Signals is also acknowledged without creating an active conversion. A completed Checkout Session that is still unpaid waits for authenticated asynchronous success rather than being treated as revenue.

## Delivery behavior

Stripe may retry deliveries, so event handling is idempotent and duplicate delivery must be expected. Keep Stripe's event identifier stable, preserve the exact raw payload for signature verification in the sending infrastructure, and treat a successful webhook acknowledgement as transport acceptance rather than proof of downstream Meta delivery. Plainrouter records provenance and exposes later delivery evidence through its Signals and Conversion API surfaces.

For customer-originated server events that are not Stripe webhooks, use the authenticated [Plainrouter Conversion API](/api/docs). For OAuth and MCP authorization, use the [Plainrouter authentication guide](/auth.md).

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
