How it works
Time-based billing charges customers for actual time they spend with billable content rather than a flat membership fee. It fits streaming, reading, and listening experiences where value scales with engagement.
The core flow
The mental model is four steps:
The user connects a payment method through
tiun.start()on your paywall.tiun starts a billing session and begins metering time against your configured interval and price.
The user is billed for time spent according to the product's interval fee and optional monthly cap.
The session ends when the user leaves, your app stops billable content, or payment fails — access returns to the locked state.
You configure the product itself in the dashboard (interval, fee, monthly limit — see Products). The SDK and events connect that configuration to your app's UI and routing.
Where the details live
The rest of the time-based reference is split across three pages, each owning one piece of the model:
Sessions — the session lifecycle (Locked / Active / Ended), what tiun tracks behind the scenes, and the
sessionIdyou can verify server-side.Access — the
paywallShowandpaywallHideevents that tell your app when the user has access.Protecting content — how to gate the UI with paywall events and how to use
tiun.setContent()to control metering as the user navigates.
For an end-to-end walkthrough, see charging for time-based sessions.
Last updated
Was this helpful?