Installation
Add the Miniwall SDK to a website, iOS, Android, React Native or Flutter app and set it up with configure.
The SDK draws the screens you build in the dashboard. It only renders: prices come from your code and the purchase stays in your code.
Before you start
You need a public key (it starts with pk_) and, usually, a placement key.
- In the dashboard open Install SDK. If the project has no public key, select Create a public key. You can also manage keys on API keys. See API keys.
- Publish a screen and point a placement at it. See Placements.
A public key can only read published screens and send events, so it is safe to put in a page or ship in an app.


- Paywall picks the screen the snippet opens.
- Copy copies the snippet.
Install
Script tag. The Install SDK page shows this snippet with your key filled in.
<script src="https://sdk.miniwall.app/ui-kit.iife.js"></script>
<script>
UIKit.configure({ apiKey: 'pk_...' });
</script>Or npm (@miniwall/web):
npm install @miniwall/webimport { configure, presentPaywall } from '@miniwall/web';
configure({ apiKey: 'pk_...' });- No framework is needed. Svelte and the renderer are compiled in. TypeScript types are included.
- Screens draw inside a shadow root: your CSS does not leak in and the screen's CSS does not leak out.
- The script defines
window.UIKit(every SDK function) and the<uikit-paywall>element. See Web component. - The npm package is ESM only (
requireis not supported) and hassideEffects: false. The script build is also exported as@miniwall/web/iife. For React, add@miniwall/react(React). - Load the script before the code that uses
UIKit. - Importing on the server (Next.js, Remix) is safe: nothing touches the DOM until you call a function. Do not call
presentPaywall,mountPaywallorstartAutoPlacementswhile rendering on the server. - Browsers: the last two versions of Chrome, Edge, Firefox and Safari, iOS Safari 16+, Android Chrome.
The hosted script is the build of the latest @miniwall/web release, so it moves when a new release ships. To pin a version, install from npm.
On mobile there is no web view and there are no third-party dependencies. Screens and images are cached on the device, so a published screen keeps working offline. Nothing is shown until you call present or start auto placements.
Configure
Call configure once at startup, before you load a placement. It sets defaults for every call. Options passed to a single call win.
configure({
apiKey: 'pk_...',
locale: 'vi_VN',
colorMode: 'system',
attributes: { plan: 'free' },
});| Option | Type | Default | What it does |
|---|---|---|---|
API key (apiKey) | string | none | Your public key. Needed for placements, paywall IDs and auto placements. Not needed for a JSON or URL source. |
apiUrl (apiURL on iOS) | string | https://api.miniwall.app | The delivery API. Override it only to self-host. |
locale | string | Web: the screen's default language. Mobile: the device's language | Language to render, such as vi_VN. A call's own locale wins. |
colorMode | light, dark or system | Web: light. Mobile: system | system follows prefers-color-scheme (web) or the device's appearance. |
analytics | boolean | true | Send views, closes and purchase events to the dashboard (only for screens loaded by placement or paywall ID). |
attributes | map | none | What you know about the user, for audiences. Kept on the device, never sent. See Targeting attributes. |
timeoutMs | number | 8000 | How long to wait for the delivery API. After that the last saved copy is used, or the call fails. On iOS the option is timeout, in seconds (default 8). |
maxFontScale | number | 1.6 | Mobile only. Largest text-size multiplier taken from the system text size; 1 turns it off. |
On the web, calling configure again changes only the options you pass; on mobile it replaces the options with the ones you pass. setAttributes adds to the saved attributes later (for example after sign-in), and null removes one.
Differences
Web: a cookie banner may need to come first. The SDK writes items to browser storage under keys that start with uikit:, so call configure after consent. See Events and privacy. Add your domains to Allowed sources (Pro plan and above) to stop other sites using your key. See Allowed domains and Security and CSP.
Mobile: every request carries your app ID in the X-Miniwall-App header: ios:com.acme.app (bundle ID) or android:com.acme.app (application ID). If your project has app entries in Allowed sources, add every app ID you ship, including debug builds with a different ID. Others get 403 app_not_allowed (see Errors). An empty list accepts every app.
Check that it works
Show a screen from a placement, then open Install SDK in the dashboard. Its status block reads Waiting for your site. until a view arrives, then Live with the number of views in the last 7 days. If nothing arrives, see Errors.

