Payments overview
ShipFree uses an adapter-based payment system with a shared interface and multiple providers.Key files
src/config/payments.tsdefines plans and pricingsrc/lib/payments/service.tsresolves the active adaptersrc/lib/payments/types.tsdefines shared interfacessrc/app/api/payments/*exposes checkout, portal, and subscription routessrc/app/api/webhooks/payments/route.tshandles provider webhooks
API routes
POST /api/payments/checkoutcreates a checkout sessionPOST /api/payments/portalcreates a customer portal sessionGET /api/payments/subscriptionreturns the current user subscription
Database tables
The payment system writes to these tables insrc/database/schema.ts:
customersubscriptionpayment
The active payment provider is selected with
PAYMENT_PROVIDER. Use BILLING_ENABLED to gate access to paid features.