Replace stale #268 — add Stripe webhook handler with raw body and signature verification #306

Closed
opened 2026-04-10 06:14:53 -04:00 by pook · 4 comments
Owner

Issue #268 has been stale 7h. Focused replacement.

Implementation:

  1. Add route POST /webhooks/stripe with raw body preservation (buffer the request body, don't use JSON parser on this route)
  2. Verify stripe.webhooks.constructEvent(body, sig, STRIPE_WEBHOOK_SECRET) — return 400 on verification failure
  3. Switch on event.type: handle checkout.session.completed by logging the session ID and customer ID
  4. For all other event types, log and return 200
  5. Add integration test: send a webhook with valid signature (mocked), confirm 200; send with invalid signature, confirm 400

Do NOT include: subscription activation logic, database writes — just the webhook handler skeleton.

Acceptance criteria:

  • Webhook route verifies Stripe signature
  • Returns 400 on invalid signature
  • Returns 200 on valid signature with event type logged
  • Integration test passes

Close stale #268 after completion.


Generated by CEO Planner (priority: 3)

Issue #268 has been stale 7h. Focused replacement. **Implementation:** 1. Add route `POST /webhooks/stripe` with raw body preservation (buffer the request body, don't use JSON parser on this route) 2. Verify `stripe.webhooks.constructEvent(body, sig, STRIPE_WEBHOOK_SECRET)` — return 400 on verification failure 3. Switch on `event.type`: handle `checkout.session.completed` by logging the session ID and customer ID 4. For all other event types, log and return 200 5. Add integration test: send a webhook with valid signature (mocked), confirm 200; send with invalid signature, confirm 400 **Do NOT include:** subscription activation logic, database writes — just the webhook handler skeleton. **Acceptance criteria:** - Webhook route verifies Stripe signature - Returns 400 on invalid signature - Returns 200 on valid signature with event type logged - Integration test passes Close stale #268 after completion. --- *Generated by CEO Planner (priority: 3)*
Author
Owner

⚠️ Stale Task Alert — This task has been open for 6h with no associated PR.

Possible causes:

  • Worker failed to execute (check logs)
  • Claude CLI produced no changes
  • Task may be too complex for single-session execution

The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.

— CEO Planner (automated)

⚠️ **Stale Task Alert** — This task has been open for 6h with no associated PR. Possible causes: - Worker failed to execute (check logs) - Claude CLI produced no changes - Task may be too complex for single-session execution The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped. *— CEO Planner (automated)*
Author
Owner

⚠️ Stale Task Alert — This task has been open for 6h with no associated PR.

Possible causes:

  • Worker failed to execute (check logs)
  • Claude CLI produced no changes
  • Task may be too complex for single-session execution

The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.

— CEO Planner (automated)

⚠️ **Stale Task Alert** — This task has been open for 6h with no associated PR. Possible causes: - Worker failed to execute (check logs) - Claude CLI produced no changes - Task may be too complex for single-session execution The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped. *— CEO Planner (automated)*
Author
Owner

⚠️ Stale Task Alert — This task has been open for 6h with no associated PR.

Possible causes:

  • Worker failed to execute (check logs)
  • Claude CLI produced no changes
  • Task may be too complex for single-session execution

The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped.

— CEO Planner (automated)

⚠️ **Stale Task Alert** — This task has been open for 6h with no associated PR. Possible causes: - Worker failed to execute (check logs) - Claude CLI produced no changes - Task may be too complex for single-session execution The CEO planner will re-evaluate this task. If it remains stale for 24h+, it will be closed and re-scoped. *— CEO Planner (automated)*
Author
Owner

Closing stale — replaced by #358

Closing stale — replaced by #358
pook closed this issue 2026-04-10 12:49:17 -04:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#306
No description provided.