feat(integrations): push Stripe payment, subscription, and uninstall events by webhook
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- playwright, typescript
- 領域
- backend, documentation
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- TypeScript
- スター
- 1
- フォーク
- 1
- 平均マージ
- 6時間 56分
- マージ済み PR(30日)
- 136
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
eddiejaoude/StackDash のほかの issue
-
area: docs documentation priority: P3 size: S
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
eddiejaoude/StackDash#462 ·
メンテナーはふだん 1 日以内に返信
-
area: web bug priority: P3 size: XS
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
eddiejaoude/StackDash#432 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area: database bug priority: P3 size: S
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
eddiejaoude/StackDash#419 ·
メンテナーはふだん 1 日以内に返信
-
area: docs bug priority: P2 size: XS
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
eddiejaoude/StackDash#418 ·
メンテナーはふだん 1 日以内に返信
-
accessibility area: timeline bug priority: P3 size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
eddiejaoude/StackDash#389 ·
メンテナーはふだん 1 日以内に返信
eddiejaoude/StackDash の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
open-webui/tether#52 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
voidzero-dev/void#835 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AykutSarac/jsoncrack.com#616 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
melgarafael/DeskcommCRM#4679 ·
メンテナーはふだん 1 日以内に返信