- Manual/Offline Payment (fully working)
- Stripe (online payments)
- PayPal (placeholder)
- Binance (placeholder)
- Easy to add more providers
Location: /dashboard/admin/payment-requests
Features:
- Real-time dashboard with stats
- Filter by status (Pending, Contacted, Payment Received, Completed)
- Sortable table with student details
- Quick actions for each request
- Total revenue tracking
Complete end-to-end process:
- Student submits payment request
- Admin reviews and sends payment instructions
- Student makes offline payment
- Admin confirms and enrolls student
- Student gets instant access to courses
- Professional HTML invoices
- Auto-numbering (INV-{timestamp}-{id})
- Company branding support
- Print-friendly design
- Accessible via URL
- Start Development Server:
npm run dev- Create Manual Payment Product:
- Go to http://localhost:3000/dashboard/admin/products/new
- Select "Manual/Offline Payment"
- Fill details and save
- Test Payment Request Flow:
- Login as student
- Find the product
- Click "Contact for Payment"
- Submit request
- Process as Admin:
- Go to http://localhost:3000/dashboard/admin/payment-requests
- See pending request
- Click "Manage"
- Fill payment instructions
- Mark as "Payment Received"
- Click "Confirm Payment & Enroll Student"
- ✅
payment_requeststable with full workflow support - ✅ RLS policies for security
- ✅ Indexes for performance
- ✅ Payment provider abstraction layer
- ✅ Manual payment provider implementation
- ✅ Server actions for CRUD operations
- ✅ Invoice generation system
- ✅ API route for invoice viewing
- ✅ Admin payment requests dashboard
- ✅ Payment request management dialog
- ✅ Student contact form
- ✅ Payment method selector in product form
- ✅ Status badges and statistics
- ✅ Complete implementation guide
- ✅ Testing instructions
- ✅ API reference
- ✅ User flows documented
- Contact form for payment requests
- Status tracking
- Invoice access
- Automatic enrollment after payment
- Centralized dashboard
- Status workflow management
- Invoice generation
- One-click enrollment
- Full audit trail
- Statistics and reporting
payment_requests (
request_id - Unique ID
user_id - Student
product_id - Product requested
status - Workflow status
contact_* - Contact information
payment_* - Payment details
invoice_* - Invoice tracking
admin_notes - Internal notes
)- Pending - Student submitted, awaiting admin
- Contacted - Admin sent payment instructions
- Payment Received - Payment confirmed
- Completed - Student enrolled
- Cancelled - Request cancelled
Optional environment variables for invoice branding:
COMPANY_NAME="Your LMS Platform"
COMPANY_ADDRESS="123 Main St, City, Country"
COMPANY_EMAIL="billing@yourlms.com"
COMPANY_PHONE="+1 234 567 8900"- Create manual payment product
- Student submits payment request
- Admin sees pending request
- Admin sends payment instructions
- Admin confirms payment
- Student gets enrolled
- Invoice generates correctly
Run Playwright tests:
npx playwright test tests/admin/products-manual-payment.spec.ts- Email notifications
- SMS notifications
- PDF invoice generation (currently HTML)
- Payment receipt upload
- Bulk payment processing
- Export to CSV
- Payment reminders
See detailed docs in:
docs/MANUAL_PAYMENT_COMPLETE.md- Full feature documentationdocs/MANUAL_PAYMENT_SYSTEM.md- Architecture guideTESTING_GUIDE.md- Testing instructions
You now have a production-ready manual payment system that:
✅ Works immediately for offline sales ✅ Tracks all payment requests ✅ Provides complete workflow automation ✅ Generates professional invoices ✅ Automatically enrolls students ✅ Maintains full audit trail ✅ Scales for future payment providers
Perfect for your offline customer use case while maintaining infrastructure for future online payments!
Built with ❤️ using Next.js 16, Supabase, and shadcn/ui