Add customer.subscription.deleted webhook handler to revoke /api/generate access #1322

Open
opened 2026-04-13 13:23:44 -04:00 by pook · 0 comments
Owner

Create a Stripe webhook handler for customer.subscription.deleted and customer.subscription.updated events. On deletion:

  1. Look up subscription by Stripe subscription ID in database
  2. Set status to 'canceled'
  3. The subscription gate (issue #1315) will then deny /api/generate access

On update (past_due, unpaid, trialing → incomplete):

  1. Sync the subscription status from Stripe to the database
  2. Ensure the gate reflects the current status

Add to the webhook handler module alongside checkout.session.completed.

Acceptance: Cancellation immediately revokes document generation access. Status sync catches payment failures.


Generated by CEO Planner (priority: 2)

Create a Stripe webhook handler for `customer.subscription.deleted` and `customer.subscription.updated` events. On deletion: 1. Look up subscription by Stripe subscription ID in database 2. Set status to 'canceled' 3. The subscription gate (issue #1315) will then deny /api/generate access On update (past_due, unpaid, trialing → incomplete): 1. Sync the subscription status from Stripe to the database 2. Ensure the gate reflects the current status Add to the webhook handler module alongside checkout.session.completed. Acceptance: Cancellation immediately revokes document generation access. Status sync catches payment failures. --- *Generated by CEO Planner (priority: 2)*
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#1322
No description provided.