Webhooks¶
Doable both receives webhooks (Stripe, GitHub, integration providers) and does not currently emit outbound webhooks for app events. This page documents the inbound side.
Stripe¶
Verifies the signature against STRIPE_WEBHOOK_SECRET. Handled events:
| Event | Effect |
|---|---|
checkout.session.completed |
Activate subscription, top up credits |
customer.subscription.updated |
Sync plan tier on the workspace |
customer.subscription.deleted |
Downgrade to free |
invoice.payment_failed |
Email the workspace owner |
payment_intent.succeeded |
Top up credit balance for credit-pack purchases |
Source: services/api/src/routes/billing.ts.
In your Stripe dashboard, point the webhook at:
and copy the signing secret into STRIPE_WEBHOOK_SECRET.
GitHub¶
When a workspace member connects a GitHub repo, Doable installs a webhook on the repo so it can react to pushes:
Handled events:
| Event | Effect |
|---|---|
push |
Pull changes into the project file tree |
pull_request.closed |
Mark the related "Doable PR" as merged in the UI |
installation |
Track GitHub App installations across workspaces |
Source: services/api/src/routes/github.ts, services/api/src/routes/github/, and services/api/src/github/.
Integration providers¶
Each connected integration that supports webhooks (Slack, Linear, Notion, Stripe-as-app, etc.) gets its own callback URL of the form:
The signature header and verification scheme depend on the provider. See services/api/src/integrations/runner.ts and the per-provider entries in services/api/src/integrations/registry/.
Configuring a public webhook URL¶
For local development:
- Use ngrok, Cloudflare Tunnel, or Tailscale Funnel to expose your local API.
For production:
- The default nginx config already routes
/billing/webhook,/github/webhook, and/integrations/*/webhook/*to the API. No extra setup required.
Testing webhooks¶
# Stripe
stripe listen --forward-to https://<api>/billing/webhook
stripe trigger checkout.session.completed
# GitHub
gh webhook forward --repo <owner/repo> --events push --url https://<api>/github/webhook