Webhooks
The webhooks Pagebread receives from its payment and email providers, how they are verified, and the state of outbound webhooks.
Pagebread receives webhooks from two providers: Dodo Payments for billing and Resend for email. Both are endpoints Pagebread itself consumes. You can't register your own endpoint for them, and you don't need to call them.
Outbound webhooks are not available yet
Pagebread doesn't send webhooks to your systems. Plans list a webhooks feature and a number of webhook endpoints, but nothing sends events to customer endpoints today, and there is no screen or route to configure one. Use the API to read the state you need.
The two inbound endpoints
| Endpoint | Sender | What it is for |
|---|---|---|
POST /api/v2/billing/webhooks/dodo | Dodo Payments | Payments, renewals, subscription status |
POST /api/v2/public/webhooks/resend | Resend | Email bounces and complaints |
Neither takes a bearer token: the caller is a provider, not a person. Each is authenticated by a signature over the exact bytes of the request body, with a secret shared with that provider and held only on Pagebread's servers.
How deliveries are verified
Both providers sign in the same scheme (Standard Webhooks, which Resend delivers through Svix):
- Three headers come with each delivery: an id, a Unix timestamp, and one or more signatures.
- The signed content is
<id>.<timestamp>.<raw body>. - The signature is an HMAC-SHA256 of that content with the endpoint's secret, base64-encoded, sent as
v1,<signature>. Several may be sent, separated by spaces; one match is enough.
| Endpoint | Id header | Timestamp header | Signature header |
|---|---|---|---|
| Dodo | webhook-id | webhook-timestamp | webhook-signature |
| Resend | svix-id | svix-timestamp | svix-signature |
For Dodo deliveries, Pagebread also refuses a timestamp more than five minutes from its own clock. Resend deliveries are checked with Resend's own library.
A delivery that doesn't verify, or that arrives when the endpoint has no secret configured, gets a fixed 401 UNAUTHORIZED and nothing in it is read.
Billing events from Dodo
Every delivery is recorded under its webhook-id, so a delivery seen before is not applied twice. Pagebread doesn't trust the payload itself: it fetches the payment or subscription the event names from Dodo again and applies Dodo's answer.
| Event family | What Pagebread does |
|---|---|
payment.* for a checkout | Completes the checkout: the workspace moves to the paid plan and a receipt is written. |
payment.succeeded on a running subscription | Applies a plan change that was waiting for its charge; otherwise records the renewal, moves the billing period on and writes a receipt. |
payment.failed for a plan change | Fails that checkout. Nothing else changes. |
subscription.* | Follows Dodo's status: past due becomes Payment overdue, on hold becomes Restricted, paused becomes Paused, active becomes active again. A subscription that is cancelled or expired moves the workspace to Free, with nothing deleted. The cancel-at-period-end flag follows Dodo too. |
refund.*, dispute.* | Logged for Pagebread staff. Nothing changes in the workspace. |
| Anything else | Acknowledged and ignored. |
Responses:
204when the event was applied, ignored or already seen.500when applying it failed. Dodo then retries; each step is safe to repeat, so a retry applies once.
What these states mean for a workspace is described in Trials, downgrades and freezes.
Email events from Resend
Pagebread acts on two events. Everything else is acknowledged with 204 and dropped.
| Event | What Pagebread does |
|---|---|
email.bounced with a permanent bounce | Suppresses the address: Pagebread stops sending to it. |
email.complained | Suppresses the address. |
Temporary bounces are left alone, since Resend retries them itself. When an address is suppressed, any open update request sent to it is marked as bounced, so your team sees it and can reach the applicant another way.
A delivery later reporting a successful send does not lift a suppression. If recording a suppression fails, the endpoint answers 500 so Resend retries.
Rate limits
Both endpoints share a dedicated rate-limit tier, separate from the other public routes. See Rate limits.