refactor: Update Stripe flows for nullable stripe_customer_id (#205) #210
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Relates to #205
Milestone 4: Service - Stripe flows + null handling
Files
backend/src/features/subscriptions/domain/subscriptions.service.tsbackend/src/features/subscriptions/api/subscriptions.controller.ts(comment cleanup only)Changes
Extract
ensureStripeCustomer()private method (replacesresolveStripeCustomerId()):upgradeSubscription()(lines 203-280):resolveStripeCustomerId()call (line 220) withensureStripeCustomer()updatePaymentMethod()(lines 965-973):resolveStripeCustomerId()call withensureStripeCustomer()getInvoices()(line 981):if (!subscription?.stripeCustomerId) { return []; }Edge case hardening for
cancelSubscription()andreactivateSubscription()(service layer):Controller comment cleanup: Remove any stale comments in subscriptions.controller.ts referencing admin_override_ pattern
Tests
Mobile + Desktop Validation
Acceptance Criteria