feat(integrations): push Stripe payment, subscription, and uninstall events by webhook
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- playwright, typescript
- Área
- backend, documentation
Línea de trabajo
Start with docs/providers/stripe.md (the Webhooks table and "Timeline events by polling") and the closed adapter work in src/lib/adapters/stripe/, then read the webhook contract, route and deduplication key from #28 — this issue cannot be picked up until that lands. Implementation touches the handler, the allowlist schemas and sanitized fixtures under src/lib/adapters/stripe/, reusing polling's (connection, event id) dedup key and signature verification from the shared route. Done means npm run lint, npm run typecheck, npm test and the Playwright simulated-delivery spec pass, with no raw payload stored or logged.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Context
The Stripe adapter (#111, closed) polls GET /v1/events hourly. Eddie's decision on #28 (2026-11-14): webhooks first, polling as the backfill, and webhooks are in the MVP. Stripe can push without a new permission: a webhook endpoint on DevMacro's own Stripe account that listens to events on connected accounts receives events from every install, and the app already holds event_read.
Webhooks also close a gap polling cannot: /v1/events only goes back 30 days, so a connection that has not synced for longer loses events (docs/providers/stripe.md, "Timeline events by polling").
From docs/providers/stripe.md, "Webhooks (Post-MVP)":
| Item | Value |
|---|---|
| Where the endpoint lives | One endpoint on DevMacro's Stripe account with Listen to events on Connected accounts. Events arrive with account set to the installing account |
| Signature | Stripe-Signature: t=<timestamp>,v1=<signature>: HMAC SHA-256 of <t>.<raw body> keyed with the endpoint's whsec_ secret. Ignore schemes other than v1, compare in constant time, reject timestamps outside a tolerance (5 minutes, never 0) |
| Timeline events | The six the adapter polls: payment_intent.succeeded, payment_intent.payment_failed, customer.created, customer.subscription.created, customer.subscription.deleted, charge.refunded, plus the charge.succeeded and charge.failed the adapter reads for payments |
| Uninstall | apps.install.deleted, account.application.deauthorized |
| Not pushed as a total | Fees and balance figures stay polled |
Plan
- Implement the Stripe webhook declaration from the contract #28 adds: verify
Stripe-Signaturewith a newSTRIPE_WEBHOOK_SECRET(and a test mode secret, matching how the adapter handles test mode), deduplicate on the Stripe event id with the same (connection, event id) key polling uses. - Map
accountto the connection. Unknown accounts are acknowledged and dropped. - Parse
data.objectwith the same allowlist schemas polling uses and drop the raw payload at once. It carries personal data and is never logged. - Events render in the API version current when they were created, not the pinned version, so the schemas accept only the fields listed in the provider page.
apps.install.deletedandaccount.application.deauthorizedmark the connection as needing a reconnect at once.- Docs:
docs/providers/stripe.md(rename the section to "Webhooks", update "Disconnect and uninstall" and self-hosted setup),docs/operations/oauth-apps.md,docs/operations/deploy.mdfor the new variables.
Acceptance criteria
- A signed
payment_intent.succeededdelivery reaches the timeline within a minute, without waiting for a sync. - An event seen by webhook and by polling shows once.
- Unsigned, wrongly signed, stale, or repeated deliveries are rejected or ignored, and logged without their body.
- An uninstall marks the connection as needing a reconnect.
- No raw event payload is stored or logged.
- Polling still runs and still fills in fees, balances, and any missed delivery.
- Unit tests on recorded, sanitized payloads built from Stripe's documented samples. No live calls in CI.
- Playwright e2e: a signed delivery for the simulated Stripe provider appears on the timeline.
Files and areas
src/lib/adapters/stripe/(webhook handler, schemas, fixtures, tests), the webhook route from #28,docs/providers/stripe.md,docs/operations/oauth-apps.md,docs/operations/deploy.md.- Non-goals: new Stripe App permissions, and DevMacro's own billing webhooks (#83), which are a different Stripe account and endpoint.
Verification
npm run lint,npm run typecheck,npm test- The Playwright spec for the simulated delivery.
Depends on
- #28 Ingest provider webhooks (contract, route, deduplication)
- #111 Add the Stripe adapter (closed)
Branch: <issue-number>-stripe-webhooks
Closes with a Closes #<issue-number> footer on the commit or pull request.
Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown
- Lenguaje dominante
- TypeScript
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 6 h 56 min
- PR fusionados (30 d)
- 136
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de eddiejaoude/StackDash
-
area: docs documentation priority: P3 size: S
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
eddiejaoude/StackDash#462 ·
Los mantenedores suelen responder en 1 día
-
area: web bug priority: P3 size: XS
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
eddiejaoude/StackDash#432 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area: database bug priority: P3 size: S
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
eddiejaoude/StackDash#419 ·
Los mantenedores suelen responder en 1 día
-
area: docs bug priority: P2 size: XS
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
eddiejaoude/StackDash#418 ·
Los mantenedores suelen responder en 1 día
-
accessibility area: timeline bug priority: P3 size: XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
eddiejaoude/StackDash#389 ·
Los mantenedores suelen responder en 1 día
Todos los issues de eddiejaoude/StackDash
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
open-webui/tether#52 ·
Los mantenedores suelen responder en 1 día
-
`void platform install --app-access public` fails when Cloudflare reports Access is disabledAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
voidzero-dev/void#835 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
AykutSarac/jsoncrack.com#616 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
melgarafael/DeskcommCRM#4679 ·
Los mantenedores suelen responder en 1 día