Billing & Access
This page describes how billing and access logic currently work in LiVi.
Access model
The current access model is:
- FREE — limited daily usage
- PRO — extended or unlimited usage
At the current stage, FREE and PRO state is determined by server-side entitlement logic.
Billing center
Pricing acts as the billing center of the system.
Scriptwriter does not handle final billing internally. Instead, it redirects users to Pricing when billing-related actions are required.
Payment flow
The current flow is structured as follows:
- User enters Scriptwriter
- User requests PRO access
- User is redirected to Pricing
- Payment is initiated
- Payment confirmation is processed by webhook
- Entitlement state is updated
- Scriptwriter re-checks access state
Source of truth
The access source of truth is the entitlement state stored on the backend.
Local UI state is not the final authority for access validation.
Current role separation
- Scriptwriter = product interface
- Pricing = billing interface
- backend routes = payment and entitlement processing
- Supabase = access and payment state storage