SolveEase Pay — Deployment Guide
Prerequisites
- Node.js 20+
- PostgreSQL database (Neon recommended)
- Cashfree merchant account (with API credentials)
- Vercel account (recommended) or any Node.js hosting
Environment Variables
Copy .env.example and fill in values:
cp .env.example .env.local
| Variable | Description | Required |
|---|---|---|
DATABASE_URL | PostgreSQL connection string | ✅ |
CASHFREE_APP_ID | Cashfree App ID | ✅ |
CASHFREE_SECRET_KEY | Cashfree Secret Key | ✅ |
CASHFREE_ENVIRONMENT | SANDBOX or PRODUCTION | ✅ |
CASHFREE_WEBHOOK_SECRET | Cashfree webhook signing secret | ✅ |
JWT_SECRET | Secret for admin JWT tokens | ✅ |
ADMIN_EMAIL | Default admin login email | ✅ |
ADMIN_PASSWORD_HASH | bcrypt hash of admin password | ✅ |
NEXT_PUBLIC_APP_URL | Full URL of this app (e.g. https://pay.solveease.in) | ✅ |
RATE_LIMIT_WINDOW_MS | Rate limit window in ms (default: 60000) | ❌ |
RATE_LIMIT_MAX_REQUESTS | Max requests per window (default: 100) | ❌ |
Database Setup
# Generate Prisma client
npx prisma generate
# Run migrations
npx prisma migrate deploy
# (Optional) Seed initial admin and test tenant
npx prisma db seed
Local Development
npm install
npm run dev
App runs at http://localhost:3000.
Cashfree webhook in local dev: Use ngrok to expose your local server:
ngrok http 3000
# Use the generated HTTPS URL as webhook endpoint in Cashfree dashboard
Production Deployment (Vercel)
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prod
Configure environment variables in the Vercel dashboard or via CLI:
vercel env add DATABASE_URL
vercel env add CASHFREE_APP_ID
# ... etc
After deployment:
- Run migrations against production DB:
npx prisma migrate deploy - Set up the Cashfree webhook URL in Cashfree dashboard:
https://pay.solveease.in/api/webhooks/cashfree - Test with a Sandbox order before switching to Production mode
Switching to Production
- Change
CASHFREE_ENVIRONMENT=PRODUCTIONin env - Update
CASHFREE_APP_IDandCASHFREE_SECRET_KEYto production credentials - Update the webhook URL in the Cashfree production dashboard
- Test with a small real payment before enabling for all products