AI PurposerA practical reference for the live API routes that power generation and subscription flows.
POST /api/generate
Accepts source text and selected platforms, then returns generated outputs for each destination.
POST /api/paypal-confirm
Verifies completed orders, validates amount, and stores subscription status for the signed-in user.
POST /api/subscription and /api/paypal-webhook
Handles plan state changes and event callbacks from PayPal so billing state stays in sync.
Authentication is handled with Supabase, while access and subscription data stay server-checked.
Payment flow uses PayPal, with the site validating prices before unlocking paid access.
Production routing is handled by Vercel rewrites so the public paths stay clean.