Core Methods
Authentication
tiun.login()
Open the login overlay.
tiun.logout()
Clear the user session.
tiun.getUser()
Get the current user state.
tiun.getUserVerificationToken()
Get a signed token for server-side user verification.
Checkout
tiun.checkout({ productId })
Open the checkout flow for a subscription or one-time product.
Time-based
tiun.start()
Open the connect overlay for time-based billing.
Content & Access
tiun.setContent(options)
Update the current content context.
Lifecycle
tiun.init(config)
Initialize the SDK. Call once at startup.
tiun.destroy()
Destroy the SDK instance and clean up all listeners.
tiun.waitForReady()
Returns a Promise that resolves when the snippet is ready.
tiun.on(event, callback)
Subscribe to an event. Returns an unsubscribe function.
tiun.once(event, callback)
Subscribe to an event once.
Last updated
Was this helpful?

