[Agent] Issue #583: add a stripe webhook handler for custome #587

Open
pook wants to merge 58 commits from agent-task/583 into main
Owner

Closes #583

Changes

feat: issue #583 add-a-stripe-webhook-handler-for-custome (agent task liancebot583)

Acceptance Criteria

Add a Stripe webhook handler for customer.subscription.deleted events. When received:

  1. Extract subscription ID from event data
  2. Look up user by stripe_subscription_id in database
  3. Set subscription status to 'canceled'
  4. Return 200 ACK to Stripe

Place alongside existing webhook handlers. Add unit test with mock event payload. Revenue-critical: without it, canceled subscriptions remain active.

Acceptance: Webhook handler processes event, updates DB status, returns 200, test passes.


Generated by CEO Planner (priority: 2)

Tokens: 14 in / 3054 out

Closes #583 ## Changes feat: issue #583 add-a-stripe-webhook-handler-for-custome (agent task liancebot583) ## Acceptance Criteria Add a Stripe webhook handler for `customer.subscription.deleted` events. When received: 1. Extract subscription ID from event data 2. Look up user by stripe_subscription_id in database 3. Set subscription status to 'canceled' 4. Return 200 ACK to Stripe Place alongside existing webhook handlers. Add unit test with mock event payload. Revenue-critical: without it, canceled subscriptions remain active. Acceptance: Webhook handler processes event, updates DB status, returns 200, test passes. --- *Generated by CEO Planner (priority: 2)* Tokens: 14 in / 3054 out
feat: issue #583 add-a-stripe-webhook-handler-for-custome (agent task liancebot583)
Some checks failed
CI Quality Gate / Lint / Typecheck / Test / Build (pull_request) Has been cancelled
51f2eb1071
Some checks failed
CI Quality Gate / Lint / Typecheck / Test / Build (pull_request) Has been cancelled
This pull request has changes conflicting with the target branch.
  • .forgejo/workflows/ci.yml
  • bun.lock
  • package.json
  • packages/api/src/db/schema.ts
  • packages/api/src/index.ts
  • packages/api/src/middleware/csrf.ts
  • packages/api/src/middleware/rate-limit.ts
  • packages/api/src/middleware/security-headers.ts
  • packages/api/src/routes/admin.ts
  • packages/api/src/routes/billing.ts
  • packages/api/src/routes/generate-tos.ts
  • packages/api/src/routes/generate.ts
  • packages/api/src/routes/health.ts
  • packages/api/src/routes/questionnaire.ts
  • packages/api/src/services/document-generator.ts
  • packages/api/src/services/llm.ts
  • packages/api/src/templates/index.ts
  • packages/api/tsconfig.json
  • packages/shared/src/types.ts
  • packages/web/src/app/questionnaire/page.tsx
  • packages/web/src/components/documents/DocumentList.tsx
  • packages/web/src/components/questionnaire/ReviewStep.tsx
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin agent-task/583:agent-task/583
git switch agent-task/583
Sign in to join this conversation.
No reviewers
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!587
No description provided.