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-tinkoff-pay

v0.1.0

Published

A React Native module for T-Bank Acquiring SDK payments

Readme

react-native-tinkoff-pay

npm version

A React Native module for integrating T-Bank (Tinkoff) Acquiring SDK into mobile applications on iOS and Android platforms. This library enables seamless payment processing using T-Bank's payment forms, supporting various payment methods like bank cards, T-Pay, SBP, and Mir Pay (Android only).

Features

  • Unified payment initiation across iOS and Android.
  • Synchronous payment result delivery via Promise.
  • Support for custom terminalKey and publicKey per payment.
  • Built with Kotlin (Android) and Swift + Objective-C (iOS) for native performance.

Requirements

  • iOS: iOS 13.0 or higher, Xcode 15.1+, Swift 5.9.2+
  • Android: Android 7.0 (API level 24) or higher
  • React Native: 0.60.0 or higher

Installation

Install the Package

npm install react-native-tinkoff-pay
# or
yarn add react-native-tinkoff-pay

iOS Setup

  1. Update Podfile
    Add the following to your ios/Podfile:

    pod 'TASDKCore'
    pod 'TASDKUI'

    Then run:

    cd ios && pod install
  2. Configure Info.plist
    Add the following to ios/YourApp/Info.plist to support T-Pay and SBP:

    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>bank100000000004</string> <!-- T-Pay -->
        <string>bank100000000111</string> <!-- Sberbank SBP -->
        <string>bank110000000005</string> <!-- VTB SBP -->
        <!-- Add more SBP schemes as needed, up to 50 -->
    </array>
    <key>NSAppTransportSecurity</key>
         <dict>
             <key>NSAllowsArbitraryLoadsInWebContent</key>
             <true/>
             <key>NSAllowsArbitraryLoads</key>
             <false/>
             <key>NSExceptionDomains</key>
             <dict>
                 <key>securepay.tinkoff.ru</key>
                 <dict>
                 <key>NSExceptionAllowsInsecureHTTPLoads</key>
                 <true/>
                 <key>NSIncludesSubdomains</key>
                 <true/>
                 </dict>
                 <key>qr.nspk.ru</key>
                 <dict>
                 <key>NSExceptionAllowsInsecureHTTPLoads</key>
                 <true/>
                 <key>NSIncludesSubdomains</key>
                 <true/>
                 </dict>
             </dict>
         </dict>

Android Setup

  1. Configure network_security_config.xml
    Create the network_security_config.xml and Add the following to:

     <network-security-config>
         <base-config>
             <trust-anchors>
                 <certificates src="system" />
                 <certificates src="@raw/acq_tinkoff_root_cert" />
                 <certificates src="@raw/acq_ministry_of_digital_development_root_cert" />
             </trust-anchors>
         </base-config>
     </network-security-config>

    Then add this line to AndroidManifest.xml

    <application 
         ...
         android:networkSecurityConfig="@xml/network_security_config" //<-Add this line
         >  
  2. Sync Project

    cd android && ./gradlew clean build

Usage

Example

import TinkoffPay from 'react-native-tinkoff-pay';

// Initiate a payment
async function makePayment() {
  try {
    const result = await TinkoffPay.startPayment({
      orderId: 'ORDER_123',
      amount: 100000, // 1000 RUB in kopecks
      description: 'Test payment',
      customerKey: 'CUSTOMER_KEY',
      terminalKey: 'your_terminal_key',
      publicKey:
        'your_public_key',
      password: 'your_password',
    });
    console.log('Payment result:', result);
  } catch (error) {
    console.error(error);
  }
}

makePayment();

API

startPayment(paymentFlow: PaymentFlow): Promise<PaymentResult>

Initiates a payment using T-Bank's payment form.

  • Parameters:

    • paymentFlow: PaymentFlow:
      • orderId: string - Unique order identifier in the merchant's system.
      • amount: number - Payment amount in kopecks (e.g., 100000 for 1000 RUB).
      • description: string - Brief description of the order.
      • customerKey: string - Unique customer identifier for card saving.
      • terminalKey: string - Terminal identifier from T-Bank personal account.
      • publicKey: string - Public key for data encryption from T-Bank personal account.
      • password: string - Password for token generation (should be handled server-side in production).
  • Returns: Promise<PaymentResult>

    • status: 'succeeded' | 'cancelled' - Payment outcome.
    • paymentId?: string - Payment identifier (if succeeded).
    • cardId?: string - Card identifier (if succeeded and card was saved).
  • Throws: Error - If payment fails or SDK initialization fails.


Configuration

Prerequisites

To use this library, you need:

  • TerminalKey, PublicKey, and Password from your T-Bank personal account after enabling Internet Acquiring.
  • See Personal Account Settings for details.

Security Notes

  • Token Generation: The password is used client-side for token generation in this implementation. Make shure you dont store password in application source.
  • SSL/TLS Certificates: Configure your app to support MinTsifra certificates for reliability:

Troubleshooting

  • "ActivityNotFoundException": Ensure TinkoffPaymentActivity is registered in your Android manifest (see Android Setup).
  • "SDK not initialized": Verify that terminalKey, publicKey, and password are valid. The library initializes the SDK on the first startPayment call.
  • Payment Fails: Enable debug logging with AcquiringSdk.isDebug = true and check Logcat (Android) or Xcode logs (iOS) for details.

Development

Building the Library

yarn clean
yarn prepare

Testing

yarn test
yarn typecheck
yarn lint

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a feature branch:
    git checkout -b feature/your-feature
  3. Commit your changes:
    git commit -am 'Add your feature'
  4. Push to the branch:
    git push origin feature/your-feature
  5. Open a Pull Request.

Report bugs or request features at GitHub Issues.


License

MIT License. See LICENSE for details.


Acknowledgments