Subscription
Plans, usage, credits, and billing state.
- Get user's credit balance and transactions
GET /api/credits - Check if user has enough credits for a scan
GET /api/credits/check - Get user's invoice history
GET /api/invoices - Get current user's subscription
GET /api/subscription - Cancel pending downgrade
POST /api/subscription/cancel-downgrade - Get detailed subscription info including period
GET /api/subscription/details - Request subscription downgrade
POST /api/subscription/downgrade - Get downgrade status and grace period info
GET /api/subscription/downgrade/status - Export user data before downgrade
POST /api/subscription/export - Download exported data
GET /api/subscription/export/download/{export_id} - Get full subscription and credits info
GET /api/subscription/full - Get current usage metrics
GET /api/usage - Get usage for specific type
GET /api/usage/{usage_type}