Overview
The MechZie admin panel is a separate web application that communicates with the same API usingadmin or super_admin JWT tokens.
Admins authenticate via Firebase email/password (not phone OTP) through a dedicated endpoint.
Admin Login
1
Sign in via Firebase email/password
Use the Firebase JS SDK in the admin panel:
2
Exchange Firebase token for MechZie JWT
3
Use the access token
Store and use
accessToken as a Bearer token for all admin API calls.
Refresh using POST /auth/refresh like any other role.Payments
List Payments
GET /admin/payments
Returns a paginated list of all payments with joined customer and mechanic details.
Amounts are in paisa (÷ 100 = ₹).
Query parameters:
Payment Stats
GET /admin/payments/stats
Returns aggregate stats across all payments in a single query.
Invites (super_admin only)
List Invites
GET /super-admin/invites
Returns all invites (pending, used, and revoked) ordered newest-first.
The invite token hash is never included in the response.
invited_by_name is null if the inviting super_admin account has been deleted.