Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Test flows

Use this checklist while validating a tiun integration in sandbox — the parallel test environment with its own snippet ID, product IDs (p-test-...), and API keys. Items are grouped by pricing model so you can focus on what applies to your integration.

General (all pricing models)

  • Overlay opens when triggered (tiun.checkout() for subscriptions and one-time purchases, tiun.start() for time-based).

  • Test payment methods complete successfully — see Simulate payments for test cards and the PayPal simulator.

  • A failed payment (declining test card or Fail test setup in the PayPal flow) grants no access and surfaces through the SDK error event so you can log or show UI.

  • Overlay closes cleanly after success or cancel.

  • If you verify purchases or sessions on your server, requests use the sandbox base URL and a sandbox API key (not shared with live). Replace both with live URL and key when you ship.

Subscriptions

  • userChange fires after checkout with event: 'checkout' and updated productAccess.

  • Login and logout behave correctly (see authenticating your user).

  • After a successful purchase, productAccess includes the expected product ID.

  • Returning to the app restores the user session without forcing login (userChange with event: 'init').

  • After cancelling the test subscription in the account portal, the product ID is removed from productAccess.

One-time purchases

  • The checkout overlay shows the price with no billing interval or trial.

  • userChange fires after checkout with event: 'checkout' and the product ID in productAccess.

  • Returning to the app restores the purchase without forcing login (userChange with event: 'init').

  • After logging out and back in with the same email, the product ID is still in productAccess — one-time purchases don't expire unless the product has limited access, so there's no cancellation path to test.

  • For a repeatable product, checkout without a referenceId shows a configuration error, checkout with a referenceId the customer already bought shows "already purchased", and your server's access check returns hasAccess: true only for the reference IDs the customer bought. See verifying repeatable purchases server-side.

Time-based billing

  • paywallShow fires when the user doesn't have access.

  • paywallHide fires when access is granted and a session is active — payload includes a sessionId.

  • setContent() pauses and resumes sessions correctly across content types.

  • Switching between paid and free content updates the session state as expected.


For sandbox vs. live setup, see setting up your environment. For how the two environments differ, see Sandbox in Reference.

Last updated

Was this helpful?