First Integration

After installing the SDK, the next step is to connect your product to your app. The method you call depends on your product type.

Subscriptions

Call tiun.checkout() with the product ID you want the user to subscribe to:

tiun.checkout({ productId: 'YOUR_PRODUCT_ID' });

Attach this to any user interaction — a button click, link, or card. tiun opens the checkout overlay and handles payment, authentication, and access from there.

Time-based billing

Call tiun.start() to open the connect overlay where the user links a payment method:

tiun.start();

Once connected, tiun starts a billing session and your app receives paywall events to control access.


You can find your product ID in the tiun.business dashboardarrow-up-right under Products. See Managing products for details.


What do you want to build?

Last updated

Was this helpful?