Companion for chat_web_app#75 (portal cancel/change local sync)
Soft-delete DELETE /api/user/ for the authenticated user only: deleted=True, is_active=False, hide conversations, blacklist outstanding refresh tokens; staff self-delete rejected
Stripe customer.subscription.updated / deleted webhooks sync plan status, cancel_at_period_end, and current_period_end; checkout assigns plan from metadata.plan_slug
UserAuthEvent audit: account_deleted, subscription_started (first active plan), subscription_updated (plan/status/cancel changes) — visible on user admin
Document FE contract in README (endpoint, response, post-delete logout)
Test plan
uv run python manage.py test chat_backend.tests.test_views_users.CustomUserSelfDeleteTestCase finance.tests
Add account_deleted, subscription_started, and subscription_updated
event types. Soft-delete, Checkout/Backer assign, and Stripe portal
lifecycle webhooks write audit rows visible on the user admin.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
DELETE /api/user/for the authenticated user only:deleted=True,is_active=False, hide conversations, blacklist outstanding refresh tokens; staff self-delete rejectedcustomer.subscription.updated/deletedwebhooks sync plan status,cancel_at_period_end, andcurrent_period_end; checkout assigns plan frommetadata.plan_slugaccount_deleted,subscription_started(first active plan),subscription_updated(plan/status/cancel changes) — visible on user adminTest plan
uv run python manage.py test chat_backend.tests.test_views_users.CustomUserSelfDeleteTestCase finance.testsDELETE /api/user/soft-deletes self, hides conversations, blocks re-login, writesaccount_deletedauth eventsubscription_started; portal cancel/change writessubscription_updatedcancel_at_period_end/canceledonGET /finance/subscription/