Plan overview
How it worksβ
- Admin creates plans under Finance β Plans (monthly / yearly price, included credits, rollover, feature toggles).
- When a paid plan is active, Hirevia syncs it to every enabled payment gateway (Product / Price / Plan IDs).
- Candidates see plans on
`/pricing`and manage subscriptions on`/user/billing` - Checkout uses those synced IDs β Hirevia does not invent a price at payment time.
- After checkout succeeds (and webhooks / cron settle), the user gets plan access + the included wallet grant.
- If they cancel, they keep benefits until the end of the current billing cycle (gateway rules apply).
Gateway syncβ
Hirevia keeps a mapping per plan Γ interval Γ gateway (`billing_gateway_mappings`).
- Auto sync β Saving an active paid plan pushes it to Stripe, PayPal, Razorpay, Paystack, Flutterwave (whichever are enabled and configured). Free or inactive plans are skipped.
- Price changes β Changing monthly/yearly amount triggers a price rotation on the gateway so new checkouts use the new price; existing subscribers keep their current price until they change plan.
- Out of sync β If a gateway fails or you add a new payment plugin later, Finance β Plans shows an out-of-sync banner. Use Resync to push all active paid plans again.
- Per-plan status β Edit plan shows sync status per gateway (synced / failed). Fix gateway keys or webhooks, then resync.
warning
Always publish and sync plans before sending traffic to checkout. If mappings are missing, subscribe / buy will fail even though the plan looks fine in admin.
What each plan can controlβ
- Show / sell: Active and featured flags β published for checkout; featured for marketing emphasis.
- Price: Monthly and yearly amounts the gateway charges (must be synced).
- Included credits: Wallet top-up each billing period.
- Credit rollover: Whether unused credits carry into the next period or reset.
- Feature toggles: Which products the subscriber may open (Text, Voice, Video, Question practice, Answer bank, One-way, β¦).
info
A feature toggle is access only. It does not set the credit price of a session. Credit rates live on AI Providers, Question practice banks, and One-way packs.
Exampleβ
- Plan βProβ has Voice on and 500 included credits.
- AI Providers voice rate = 10 credits/minute.
- The user can open Voice and is charged
`minutes Γ 10`from the wallet β not a flat βVoice feeβ on the plan itself.
Requirementsβ
Extended license + SaaS Billing plugin + at least one payment gateway (Stripe, PayPal, Razorpay, Paystack, or Flutterwave). Gateway setup: SaaS Billing