Model overview
Aiybiz uses a per-seat subscription model. Companies pay a monthly or annual fee per user seat. Sessions run freely within the plan’s concurrent session limit — no per-hour charges, no wallet top-ups.Plans
Each plan defines:- Price per seat — monthly or annual
- maxActiveSessions — how many sessions can run simultaneously per seat
Subscription lifecycle
1
Company subscribes
POST /stripe/subscriptions/create { planId, quantity } → Stripe Subscription created2
Stripe confirms payment
Stripe fires
invoice.paid → Aiybiz activates the subscription and sets the seat count3
Ongoing renewals
Stripe fires
invoice.paid on each renewal → Aiybiz keeps the subscription active4
Cancellation or failure
customer.subscription.deleted or invoice.payment_failed → Aiybiz marks the subscription inactiveConcurrent session guard
When a session is requested, the platform checks:Auto-end cron
An internal, service-authenticated scheduled job (not reachable from the public internet) periodically:- Detects stale sessions (e.g. no heartbeat for too long)
- Force-ends them and notifies the client