Debugging

When something does not behave as expected, start with SDK logging and a short checklist of common causes before escalating.

Debug mode

Pass debug: true in the tiun.init configuration to turn on console logging from the SDK. That helps you see initialization, event flow, and errors during development.

tiun.init({
  snippetId: 'YOUR_SNIPPET_ID',
  language: 'en', // set to your site's language
  debug: true,
});

Disable or omit debug in production builds if you prefer minimal client noise.

Common issues

Issue
Likely cause
What to try

Events not firing

SDK not initialized

Call tiun.init() before subscribing to events.

Checkout not opening

Wrong or stale product ID

Compare the ID to the dashboard for the same environment (sandbox vs live).

Connect overlay not opening

SDK not initialized or wrong environment

Ensure tiun.init() has been called and the snippet is configured for a time-based product.

Sandbox payments not working

Sandbox only enabled in one place

Turn on Sandbox Mode in the dashboard and set sandbox: true in the SDK.

User state not updating

Relying only on snapshot properties

Listen for userChange and update UI from the event payload.

Session not restoring

Different browser or cleared storage

Sessions are per browser; clearing cookies or site data clears the session.

Event reference

For a full list of events and payloads, see SDK eventsarrow-up-right.

Support

If logs and the table above do not resolve the issue, contact [email protected]envelope with steps to reproduce and, when possible, snippet ID and environment (sandbox or production).

Last updated

Was this helpful?