> For the complete documentation index, see [llms.txt](https://docs.tiun.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tiun.io/sdk/readme.md).

# Overview

tiun ships **two SDKs**. They do the same job — payments, subscriptions, and access control — but they are separate packages with separate APIs. Pick the one that matches what you're building.

|                | **Web SDK**                                                       | **React Native SDK**                                                             |
| -------------- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| **Package**    | [`@tiun/sdk`](https://www.npmjs.com/package/@tiun/sdk)            | [`@tiun/react-native-sdk`](https://www.npmjs.com/package/@tiun/react-native-sdk) |
| **For**        | Any website or web app — React, Vue, Next.js, Nuxt, plain HTML/JS | React Native apps on iOS and Android                                             |
| **API**        | A global `tiun` object you call `init()` on                       | A `<TiunProvider>` and hooks                                                     |
| **Covers**     | Authentication, checkout, time-based billing                      | Authentication and checkout                                                      |
| **Start here** | [Web SDK / Installation](/sdk/web-sdk/installation.md)            | [React Native SDK / Installation](/sdk/react-native-sdk/installation.md)         |

{% hint style="warning" %}
**They are not layered — pick one.** The React Native SDK is a standalone package; it does not wrap or depend on `@tiun/sdk`. A React Native app never installs the web SDK, and the web SDK's `tiun.init()` API does not apply there.
{% endhint %}

***

## What the SDK does

Whichever one you use, it's there to:

* **Accept payments** — Open a checkout flow and let users purchase products or subscriptions.
* **Control access** — Gate content behind a paywall based on what the user has bought.
* **Manage user sessions** — Let users log in, log out, and stay signed in across visits.

Everything runs on the client. There's no server-side code required to get started, and no payment UI for you to build — checkout, login, and paywall overlays are all provided.

***

## Building a native app that isn't React Native?

If your app is a native shell (Swift, Kotlin) hosting your own web app in a WebView, the **web SDK** runs inside that WebView unchanged — see [Native apps with a WebView](/sdk/other-platforms/webview.md). First-class Swift, Kotlin, and Flutter SDKs are on the roadmap.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tiun.io/sdk/readme.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
