Creating a Checkout

Checkout is opened with the SDK from @tiun/sdkarrow-up-right. For subscription products, the entry point is tiun.checkout, which shows tiun's checkout overlay for the product you specify.

Opening checkout

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

Pass the product ID from your tiun dashboard. You can attach this call to any user interaction — a button, link, card, or menu item.

Options

Option
Type
Required
Description

productId

string

Yes

The subscription product to purchase.

Multiple products

On a pricing page, use one checkout call per plan, each with the matching productId.

Example: two plans

tiun.checkout({ productId: 'p-live-basic' });
tiun.checkout({ productId: 'p-live-pro' });

What you get

Checkout includes authentication: users enter email (and complete verification as needed) inside the flow. The overlay shows plan details and payment. You do not implement separate forms or validation for those steps.

circle-info

tiun.checkout() is for subscription products. For time-based billing, use tiun.start()arrow-up-right instead — it opens a connect overlay where the user links a payment method to begin a billing session.

Last updated

Was this helpful?