npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-purchasely

v6.0.0

Published

Purchasely is a solution to ease the integration and boost your In-App Purchase & Subscriptions on the App Store, Google Play Store and Huawei App Gallery.

Downloads

4,982

Readme

React Native Purchasely

Purchasely helps React Native apps display paywalls and manage in-app purchases and subscriptions on the App Store, Google Play, Huawei AppGallery and Amazon Appstore.

Installation

npm install react-native-purchasely

Install the Android store package(s) you need at the same version as the core package:

npm install @purchasely/react-native-purchasely-google
npm install @purchasely/react-native-purchasely-android-player # optional video support

All Purchasely React Native packages must use the exact same version.

Initialization (v6)

The v5 paywall API (start({...}), startWithAPIKey, fetchPresentation, presentPresentationForPlacement, setPaywallActionInterceptorCallback, onProcessAction, readyToOpenDeeplink, …) has been removed. Use the builder API:

import Purchasely from 'react-native-purchasely'

const configured = await Purchasely.builder('YOUR_API_KEY')
  .appUserId(null)              // optional
  .runningMode('full')          // 'observer' (default) | 'full'
  .logLevel('debug')            // 'debug' | 'info' | 'warn' | 'error'
  .stores(['google'])           // Android only: 'google' | 'huawei' | 'amazon'
  .storekitVersion('storeKit2') // iOS only: 'storeKit1' | 'storeKit2'
  .allowDeeplink(true)          // call when your navigation is ready
  .allowCampaigns(true)
  .start()

Display a paywall

const outcome = await Purchasely.presentation
  .placement('ONBOARDING')
  .contentId('content_123')
  .build()
  .display()

if (outcome.error) {
  console.error(outcome.error.message)
} else if (outcome.purchaseResult === 'purchased' || outcome.purchaseResult === 'restored') {
  console.log('Purchased plan:', outcome.plan)
} else {
  console.log('Dismissed:', outcome.closeReason)
}

Use Purchasely.presentation.screen('SCREEN_ID') to target a specific screen, or .default() for the SDK default placement. build() returns a request with preload(), display(), close() and back().

Action interception

Purchasely.interceptAction('purchase', async (_info, payload) => {
  if (payload?.kind !== 'purchase') return 'notHandled'

  const handled = await myBilling.purchase(payload.plan.productId)
  return handled ? 'success' : 'failed'
})

Purchasely.interceptAction('navigate', async (_info, payload) => {
  if (payload?.kind !== 'navigate') return 'notHandled'
  await Linking.openURL(payload.url)
  return 'success'
})

Handlers return 'success' | 'failed' | 'notHandled'; there is no onProcessAction in v6.

Embedded paywall

PLYPresentationView remains available for embedded paywalls. onPresentationClosed receives the same 5-field PLYPresentationOutcome as request.display() ({ presentation, purchaseResult, plan, closeReason, error }):

import { PLYPresentationView } from 'react-native-purchasely'

<PLYPresentationView
  placementId="ACCOUNT"
  flex={1}
  onPresentationClosed={(outcome) => console.log(outcome.purchaseResult, outcome.closeReason)}
/>

Migration guide

See MIGRATION-v6.md for the complete v5 → v6 mapping and platform limitations.

Documentation

Full documentation: Purchasely Docs.