Skip to content

feat: Add Stripe customer conflict handling to organization merge#817

Merged
bokelley merged 1 commit into
mainfrom
bokelley/stripe-customer-sync
Jan 20, 2026
Merged

feat: Add Stripe customer conflict handling to organization merge#817
bokelley merged 1 commit into
mainfrom
bokelley/stripe-customer-sync

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

  • Add mismatch detection for orgs with multiple Stripe customers (different customer in DB vs Stripe metadata)
  • Add /api/admin/stripe-mismatches endpoint to list and resolve mismatches
  • Update admin-billing.html with UI to view and resolve mismatches (auto-resolve for inactive customers)
  • Add Stripe customer conflict detection to organization merge flow
  • Update merge UI in admin-data-cleanup, admin-prospects, admin-domain-health pages
  • Update Addie merge_organizations tool to handle stripe_customer_resolution parameter
  • Add safety checks to prevent deletion of customers with activity or when activity can't be verified

Test plan

  • TypeScript compiles without errors
  • All 241 tests pass
  • Manually tested admin-billing.html shows mismatch section
  • Manually tested admin pages load without errors

🤖 Generated with Claude Code

- Add findStripeCustomerMismatches() to detect orgs with multiple Stripe customers
- Add /api/admin/stripe-mismatches endpoint to list and resolve mismatches
- Add Stripe customer conflict detection to merge preview and execution
- Update admin-billing.html with mismatch resolution UI (keep DB/metadata, auto-resolve)
- Update admin-data-cleanup.html, admin-prospects.html, admin-domain-health.html
  to show Stripe conflicts during merge previews
- Update Addie merge_organizations tool to handle stripe_customer_resolution parameter
- Add safety checks to prevent deletion of customers with activity
- Add null check for customer activity before deletion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley merged commit 0abc223 into main Jan 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant