Skip to main content

Plan overview

How it works​

  1. Admin creates plans under Finance β†’ Plans (monthly / yearly price, included credits, rollover, feature toggles).
  2. When a paid plan is active, Hirevia syncs it to every enabled payment gateway (Product / Price / Plan IDs).
  3. Candidates see plans on `/pricing` and manage subscriptions on `/user/billing`
  4. Checkout uses those synced IDs β€” Hirevia does not invent a price at payment time.
  5. After checkout succeeds (and webhooks / cron settle), the user gets plan access + the included wallet grant.
  6. 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

Ready to build with CodeGuru?

Browse Hirevia, SocialSwap, and more β€” docs here, products on codeguru.online.