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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tapsilat/tapsilat-react-native

v2025.12.10

Published

This Expo-powered React Native app demonstrates how to integrate the [`@tapsilat/tapsilat-js`](https://www.npmjs.com/package/@tapsilat/tapsilat-js) TypeScript SDK on mobile. It ships with:

Readme

Tapsilat React Native SDK Playground

This Expo-powered React Native app demonstrates how to integrate the @tapsilat/tapsilat-js TypeScript SDK on mobile. It ships with:

  • A TapsilatProvider that bootstraps a singleton TapsilatSDK instance and exposes it via React context.
  • Hooks (useCreateOrder, useOrderStatus) that wrap common payment lifecycle actions with loading/error state.
  • A demo screen showing order creation, hosted checkout deep-linking, and status polling flows you can adapt in your product.

Installation

npm i @tapsilat/tapsilat-react-native

Getting started

npm install
export EXPO_PUBLIC_TAPSILAT_BEARER_TOKEN="<sandbox-or-prod-token>"
npm run start

On Windows, set the environment variable with setx EXPO_PUBLIC_TAPSILAT_BEARER_TOKEN "value" or add it to .env via your preferred shell. You can also place the token inside app.json > expo.extra.tapsilat.bearerToken.

Key files

  • src/config/tapsilat.ts – reads runtime configuration (base URL, bearer token, retries) from Expo extra or env vars and validates the token.
  • src/sdk/TapsilatProvider.tsx – instantiates TapsilatSDK once and shares it via React context.
  • src/hooks/useCreateOrder.ts – helper hook for createOrder with loading/error handling.
  • src/hooks/useOrderStatus.ts – configurable polling hook for getOrderStatus.
  • src/screens/DemoScreen.tsx – reference UI that wires hooks together and demonstrates checkout/status flows.

Customizing the SDK client

import { TapsilatProvider } from './src/sdk/TapsilatProvider';

const App = () => (
  <TapsilatProvider
    overrideConfig={{
      baseURL: 'https://panel.tapsilat.dev/api/v1',
      bearerToken: '<your-token>',
      timeout: 45000,
      retryAttempts: 3,
      debug: true
    }}
  >
    <YourNavigationTree />
  </TapsilatProvider>
);

Override values are merged with the defaults in tapsilatConfig, so you can supply only what you need.

Using the hooks in your screens

import { useCreateOrder } from './src/hooks/useCreateOrder';

const CheckoutScreen = () => {
  const { createOrder, loading, error, data } = useCreateOrder();

  const handleCheckout = async () => {
    const order = await createOrder({
      amount: 199.9,
      currency: 'TRY',
      locale: 'tr',
      description: 'Pro plan',
      buyer: {
        name: 'John',
        surname: 'Doe',
        email: '[email protected]',
        phone: '+905551234567'
      }
    });

    if (order?.checkout_url) {
      // Use Linking to open the hosted checkout page.
    }
  };

  return null;
};

Pair useCreateOrder with useOrderStatus to poll for completion, trigger refunds, or show payment timelines directly inside your RN experience.

Project scripts

| Script | Description | | --- | --- | | npm run start | Launch Metro/Expo dev server | | npm run android | Build/run the native Android binary (requires Android Studio) | | npm run ios | Build/run the native iOS binary (requires Xcode) | | npm run web | Run the experience on web via Expo | | npm run typecheck | Validate TypeScript types without emitting artifacts |

Next steps

  • Replace the demo screen with your navigation stack and extract the hooks/components you need.
  • Persist reference IDs securely (e.g., to AsyncStorage or your backend) before redirecting users to the hosted checkout.
  • Explore more @tapsilat/tapsilat-js endpoints (refunds, subscriptions, webhook verification) following the same provider/hook pattern established here.