16 tests covering the full Stripe webhook flow through /billing/webhook/stripe: - Subscription creation (customer.subscription.created → DB row) - Period end extraction from items (Stripe API 2026-02+ compatibility) - Billing customer creation - Status updates (active, past_due, trialing) - Cancellation (customer.subscription.deleted → cancelled) - Payment failure (invoice.payment_failed → past_due) - One-time payments (checkout.session.completed mode=payment) - Full lifecycle: create → update → recover → cancel - Edge cases: missing metadata, empty items, invalid JSON, bad signatures Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 KiB
18 KiB