Build a Time-based Paywall
1. Create a time-based product
2. Install and initialize the SDK
npm install @tiun/sdkimport { tiun } from '@tiun/sdk';
tiun.init({
snippetId: 'YOUR_SNIPPET_ID',
language: 'en', // set to your site's language
});3. Start with the paywall visible
4. Listen for paywall events
5. Start a billing session
6. Manage content on route changes
Type
When to use
7. Handle media types
Media type
Behavior
8. Go live
Full example
Last updated
Was this helpful?