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

@tapayadot/accept-react-native

v1.1.0

Published

Accept SDK for React Native/Expo

Readme

AcceptSDK

Platform iOS Android Docs License npm

React Native / Expo SDK for integrating Tapaya Accept payment processing into your app.

Installation

npm install @tapayadot/accept-react-native

Expo plugin

Add the plugin to your app.json. The plugin automatically configures the native Android Maven repository and iOS Swift Package Manager dependency:

{
  "expo": {
    "plugins": ["@tapayadot/accept-react-native"]
  }
}

Then run:

npx expo prebuild

Android

The Android SDK is distributed via GitHub Packages. The Expo plugin configures the Maven repository automatically during prebuild.

iOS

The iOS SDK is resolved via Swift Package Manager during prebuild / pod install. No additional configuration is required.

Requirements

  • React Native 0.74+ / Expo SDK 51+
  • iOS 26+
  • Android API 30+

Usage

Setup

import AcceptSDK from '@tapayadot/accept-react-native';

// Initialize once at app launch
await AcceptSDK.initialize(/* demo: */ false);

// Authenticate with your merchant token
await AcceptSDK.authenticate('your-merchant-token');

UI Theming

Customize colors and logos at initialization or any time after:

import AcceptSDK, { type AcceptThemeConfiguration } from '@tapayadot/accept-react-native';
import { assetToBase64 } from '@tapayadot/accept-react-native/utils';

const theme: AcceptThemeConfiguration = {
  colors: {
    accent: '#FF8400',
    error: '#E6282B',
    warning: '#FF8000',
    success: '#228800',
    brandGradientColors: { start: '#FF8400', end: '#9A94E9' },
  },
  images: {
    brandLogo:   await assetToBase64(require('./assets/brand-logo.png')),
    toolbarLogo: await assetToBase64(require('./assets/toolbar-logo.png')),
    solidLogo:   await assetToBase64(require('./assets/solid-logo.png')),
  },
};

// Pass at initialization
await AcceptSDK.initialize(false, theme);

// Or apply after initialization
await AcceptSDK.setTheme(theme);

Omit colors or images to keep SDK defaults for that slot. Images must be PNG or JPEG — SVG is not supported.

assetToBase64 requires expo-asset and expo-file-system. Both are included in managed Expo projects. Bare React Native users must install them manually.

Request Location Permission

Required before processing card payments (Tap-to-Pay):

await AcceptSDK.requestLocationPermission();

Card Payment (Tap-to-Pay)

import AcceptSDK, { CardPaymentIntent } from '@tapayadot/accept-react-native';

const intent: CardPaymentIntent = {
  paymentIntentId: 'pi_xxx',
  amount: 1500,
  requestedCurrency: 'CZK',
  settlementCurrency: 'EUR',
};

const result = await AcceptSDK.payments.startCardPayment(
  intent,
  (status) => console.log('Status update:', status),
  (message, exception) => console.error('Error:', message, exception),
);

switch (result.status) {
  case 'approved':
    console.log('Approved:', result.authorizationCode);
    break;
  case 'declined':
    console.log('Declined:', result.reason);
    break;
}

SEPA Instant Credit Transfer

const result = await AcceptSDK.payments.startSepaPayment(
  {
    paymentIntentId: 'pi_xxx',
    amount: 1000,
    requestedCurrency: 'EUR',
    settlementCurrency: 'EUR',
  },
  (status) => console.log('Status update:', status),
  (message, exception) => console.error('Error:', message, exception),
);

if (result.status === 'verified') {
  console.log('Received from:', result.receivedFromIban);
}

Certis (Czech Instant Transfer)

const result = await AcceptSDK.payments.startCertisPayment(
  {
    paymentIntentId: 'pi_xxx',
    amount: 10000,
    requestedCurrency: 'CZK',
    settlementCurrency: 'CZK',
  },
  (status) => console.log('Status update:', status),
  (message, exception) => console.error('Error:', message, exception),
);

KYB Onboarding

// Check if onboarding is needed before launching the KYB flow
await AcceptSDK.identity.presentKyb({
  businessType: 'company',
  legalName: 'Acme s.r.o.',
  businessEmail: '[email protected]',
  countryCode: 'CZ',
  registrationNumber: '12345678',
  vatNumber: 'CZ12345678',
  addressLine1: 'Václavské náměstí 1',
  city: 'Praha',
  postalCode: '11000',
  bankAccountIban: 'CZ...',
  businessUrl: 'https://acme.com',
  productDescription: 'SaaS platform',
  supportPhone: '+420123456789',
});

Session Management

// Check current SDK status
const status = await AcceptSDK.getStatus(); // 'IDLE' | 'INITIALIZED' | 'LOGGED_IN'

// Query the result of a previous payment
const result = await AcceptSDK.getPaymentStatus('pi_xxx');

// Log out
await AcceptSDK.logOut();

Companion App (iOS only)

The Tapaya companion app is required for card payments on iOS:

const installed = await AcceptSDK.isCompanionAppInstalled();

if (!installed) {
  // Prompt user to install via App Store sheet
  await AcceptSDK.presentCompanionAppSheet();
} else {
  // Pair with the companion app
  await AcceptSDK.pairWithCompanionApp();
}

API Reference

Top-level

| Method | Description | |---|---| | initialize(demo?, theme?) | Initialize the SDK. Pass true for sandbox mode. Optionally provide a UI theme. | | setTheme(theme) | Apply a UI theme after initialization. | | authenticate(token) | Authenticate with a merchant JWT token. | | getStatus() | Returns 'IDLE' \| 'INITIALIZED' \| 'LOGGED_IN'. | | getPaymentStatus(paymentIntentId) | Retrieve the result of a previous payment. | | logOut() | End the current merchant session. | | requestLocationPermission() | Request location permission (required for card payments). | | isCompanionAppInstalled() | iOS only. Check if the Tapaya companion app is installed. | | presentCompanionAppSheet() | iOS only. Show App Store sheet for companion app. | | pairWithCompanionApp() | iOS only. Pair with the installed companion app. |

AcceptSDK.payments

| Method | Description | |---|---| | startCardPayment(intent, onStatus, onError) | Start a card/Tap-to-Pay payment. | | startSepaPayment(intent, onStatus, onError) | Start a SEPA Instant payment. | | startCertisPayment(intent, onStatus, onError) | Start a Certis Instant payment. |

AcceptSDK.identity

| Method | Description | |---|---| | presentKyb(prefilling?) | Launch the KYB onboarding UI with optional prefill data. |

Types

type Currency = 'CZK' | 'EUR' | 'GBP'

type CardPaymentIntent = {
  paymentIntentId: string
  amount: number                   // smallest currency unit (e.g. hellers)
  requestedCurrency: Currency
  settlementCurrency?: Currency
}

type CardPaymentResult = {
  status: 'pending' | 'approved' | 'declined' | 'refunded' | 'aborted'
  last4?: string
  brand?: string
  authorizationCode?: string
  terminalId?: string
  companyName?: string
  reason?: string
  receiptUrl?: string
}

type SepaPaymentIntent = { paymentIntentId: string; amount: number; requestedCurrency: Currency; settlementCurrency?: Currency }
type SepaPaymentResult = { status: 'pending' | 'verified' | 'aborted' | 'refunded' | 'declined'; postponed: boolean; receivedAt: string; receivedFromIban: string; receiptUrl?: string }

type CertisPaymentIntent = { paymentIntentId: string; amount: number; requestedCurrency: Currency; settlementCurrency?: Currency }
type CertisPaymentResult = { status: 'pending' | 'verified' | 'aborted' | 'refunded' | 'declined'; postponed: boolean; receivedAt: string; receivedFromIban: string; receiptUrl?: string }

type GradientColors = { start: string; end: string }

type AcceptColorTheme = {
  accent: string    // #RRGGBB or #AARRGGBB
  error: string
  warning: string
  success: string
  brandGradientColors?: GradientColors
  brandSubtleGradientColors?: GradientColors
}

type AcceptImageTheme = {
  brandLogo: string    // base64 PNG/JPEG
  toolbarLogo: string
  solidLogo: string
}

type AcceptThemeConfiguration = {
  colors?: AcceptColorTheme
  images?: AcceptImageTheme
}

type KybPrefillData = {
  businessType?: 'individual' | 'company' | 'nonProfit' | 'governmentEntity'
  countryCode?: string
  registrationNumber?: string
  vatNumber?: string
  legalName?: string
  addressLine1?: string
  addressLine2?: string
  city?: string
  postalCode?: string
  merchantCategoryCode?: number
  businessEmail?: string
  bankAccountIban?: string
  businessUrl?: string
  productDescription?: string
  supportPhone?: string
}

Documentation

Full documentation is available at docs.tapaya.com.

License

Licensed under the Apache License, Version 2.0.