Add account self-delete and subscription lifecycle sync (#34)
Soft-delete DELETE /api/user/ for authenticated users (hide conversations, blacklist tokens, block staff self-delete). Sync Stripe portal cancel/change via subscription.updated/deleted webhooks and expose cancel_at_period_end for Account UI (chat_web_app#75 companion).
This commit is contained in:
@@ -199,6 +199,12 @@ class SubscriptionMeView(APIView):
|
||||
"stripe_subscription_id": (
|
||||
sub.stripe_subscription_id if sub else ""
|
||||
),
|
||||
"cancel_at_period_end": bool(sub.cancel_at_period_end) if sub else False,
|
||||
"current_period_end": (
|
||||
sub.current_period_end.isoformat()
|
||||
if sub and sub.current_period_end
|
||||
else None
|
||||
),
|
||||
"usage": usage.to_dict(),
|
||||
}
|
||||
return Response(payload)
|
||||
|
||||
Reference in New Issue
Block a user