Add Stripe checkout.session.completed webhook handler #841

Open
opened 2026-04-11 22:32:20 -04:00 by pook · 0 comments
Owner

Add a handler for the checkout.session.completed Stripe webhook event in the billing webhook route.

This is a revenue blocker — after a user pays via Checkout (issue #819 creates the session), nothing provisions their subscription in the database.

Implementation:

  1. In the webhook handler, add a case for 'checkout.session.completed'
  2. Extract customer ID, subscription ID, customer email from the session
  3. Look up the internal user by email
  4. Insert or update stripe_customers and stripe_subscriptions records with status='active'
  5. Log the provisioning event
  6. Write a test with a mock checkout.session.completed payload

Issues #831 and #833 cover invoice.payment_failed and customer.subscription.updated, but checkout.session.completed is the critical missing handler.

Acceptance:

  • Webhook processes checkout.session.completed events
  • Subscription record created with status 'active'
  • Test passes

Generated by CEO Planner (priority: 1)

Add a handler for the checkout.session.completed Stripe webhook event in the billing webhook route. This is a revenue blocker — after a user pays via Checkout (issue #819 creates the session), nothing provisions their subscription in the database. Implementation: 1. In the webhook handler, add a case for 'checkout.session.completed' 2. Extract customer ID, subscription ID, customer email from the session 3. Look up the internal user by email 4. Insert or update stripe_customers and stripe_subscriptions records with status='active' 5. Log the provisioning event 6. Write a test with a mock checkout.session.completed payload Issues #831 and #833 cover invoice.payment_failed and customer.subscription.updated, but checkout.session.completed is the critical missing handler. Acceptance: - Webhook processes checkout.session.completed events - Subscription record created with status 'active' - Test passes --- *Generated by CEO Planner (priority: 1)*
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#841
No description provided.