Nami Web SDK makes subscriptions & in-app purchases easy, with powerful built-in paywalls and A/B testing
npm install @namiml/web-sdkNami is easy subscriptions & in-app purchases, with powerful built-in paywalls and A/B testing.
This library helps you easily offer in-app purchases and subscriptions.
- No IAP code to write.
- Focus on your app experience.
- All edge cases are handled and no server is required.
- Includes is powerful built-in paywalls templates
- Update paywalls easily using a browser-based paywall CMS.
- Conduct paywall A/B tests, to improve your conversion rate.
- Robust subscription analytics, webhooks, and much more.
Requires an account with Nami ML. See https://www.namiml.com/pricing for more details and to create a free account.
You can install the SDK via NPM or Yarn
```
npm install @namiml/web-sdk --save
``
yarn add @namiml/web-sdk
Example apps showing how to use the SDK are available in our Nami Web SDK repo.
More information on configuring and using the SDK is available in our docs at https://learn.namiml.com.
To support older browsers, import our side-effect module before you import the SDK. It installs the necessary polyfills and shims, allowing the main entry point to stay the same for every app.
- ESM:
`js`
import '@namiml/web-sdk/legacy-support';
import { Nami } from '@namiml/web-sdk';
`
- CommonJS:
js`
require('@namiml/web-sdk/legacy-support');
const { Nami } = require('@namiml/web-sdk');
Modern apps that do not target legacy environments can simply import the default entry:
`js``
import { Nami } from '@namiml/web-sdk';
This keeps the modern bundle slim, while letting you opt into additional support only when you need it.