Email
Admin Emails
Pay4SaaS includes a built-in Admin Tool at /tools/admin for backend management tasks such as viewing/cancelling PayPal subscriptions and managing org restrictions. Access is controlled by the ADMIN_EMAILS environment variable.
This has nothing to do with Resend or any email sending service — it is purely an access control configuration.
Environment Variable
Add the following to your .env.local:
ADMIN_EMAILS=admin@example.comFor multiple administrators, separate emails with commas:
ADMIN_EMAILS=admin1@example.com,admin2@example.comHow It Works
- User navigates to
/tools/admin - The API checks the current logged-in user's email against
ADMIN_EMAILS - If the email matches, the user can access admin features; otherwise, a 403 error is returned
The admin email must match the email used to sign up / log in.
Available Admin Features
- Org Restrictions — View and lift payment restrictions on organizations
- PayPal Subscriptions — Search, inspect, and cancel PayPal subscriptions by user ID
Notes
- If
ADMIN_EMAILSis not set, no one can access the Admin Tool - The admin check runs on every API request — there is no separate login flow
- Admin access is API-level only; there is no client-side role stored in the database
Docs home
Return to the full implementation guide.
Pricing
Review subscriptions, credits, and lifetime options.
Blog
Read more notes on SaaS payments and growth.