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

@tap-payments/connect-v2

v0.0.33-test

Published

A React SDK that allows merchants to easily integrate with Tap Connect in their applications, handling identification and authentication seamlessly.

Readme

Connect SDK V2

A React SDK that allows merchants to easily integrate with Tap Connect in their applications, handling identification and authentication seamlessly.

This package provides:

  • ConnectElement: a React component that can be embedded directly in your app to enable secure, localized, and customizable connections.

  • renderTapConnect: a UMD helper function (available on the global TapConnectSDK object) that lets you render the widget in plain JavaScript environments without a React build setup.


📦 Installation

  • Using npm:
    npm install @tap-payments/connect-v2
  • Using yarn:
    yarn add @tap-payments/connect-v2

⚡ Quick Start

import React, { useState } from 'react';
import { ConnectElement, ConnectScope, ConnectTheme, ConnectMode } from '@tap-payments/connect-v2';

const App = () => {
  const [open, setOpen] = useState(false);

  return (
    <div>
      <button onClick={() => setOpen(true)}>Open Connect Element</button>

      <ConnectElement
        open={open}
        publicKey="pk_test_XXXXXXXXXXXXXXXXXXXXXXX"
        merchantDomain="https://example.com"
        theme={ConnectTheme.DARK}
        scope={ConnectScope.MERCHANT}
        onClose={() => setOpen(false)}
        features={{ poweredBy: true, closeButton: true }}
        mode={ConnectMode.POPUP}
      />
    </div>
  );
};

export default App;

🌐 Vanilla JS Demo

You can also use the SDK without a React build setup by including the UMD bundle directly in your HTML file. The global TapConnectSDK object provides a helper method to render the widget into any container element.

<!doctype html>
<html>
  <head>
    <title>Tap Connect SDK Demo</title>
  </head>
  <body>
    <div id="connect-container"></div>

    <button onclick="openConnect()">Open Connect</button>

    <!-- React and ReactDOM (required for the widget to work) -->
    <script src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
    <script src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>

    <!-- Tap Connect SDK UMD bundle -->
    <script src="https://cdn.tap.company/tap-sdks/connect-v2/build-0.0.28-test/index.js"></script>

    <script>
      function openConnect() {
        TapConnectSDK.renderConnectElement('connect-container', {
          open: true,
          publicKey: 'pk_test_lat64TEDSvHrUOYAxVRe28PQ',
          merchantDomain: 'https://connect.dev.tap.company',
          language: TapConnectSDK.ConnectLanguage.EN,
          theme: TapConnectSDK.ConnectTheme.DARK,
          scope: TapConnectSDK.ConnectScope.MERCHANT,
          data: ['brand', 'entity'],
          showBoard: true,
          mode: TapConnectSDK.ConnectMode.PAGE,
        });
      }
    </script>
  </body>
</html>

🧠 Props

| Prop | Type | Required | Description | | ----------------------- | ------------------------------------------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | open | boolean | ✅ | Controls whether Connect element is open or closed. | | publicKey | string | ✅ | Your public API key provided by Tap Payments. | | merchantDomain | string | ✅ | Merchant's domain (e.g. https://expamle.com). | | scope | ConnectScope | ✅ | Defines the integration scope [auth, merchant]. | | onReady | () => void | ❌ | Called when the app configurations are loaded successfully initializing. | | onClose | () => void | ❌ | Triggered when the Connect element is closed by the user. | | onError | (eror: CustomError) => void | ❌ | Triggered on any error. | | onSuccess | (response: Record<string, string \| number>) => void | ❌ | Callback triggered when the flow completes successfully. | | theme | ConnectTheme | ❌ | Customize the app theme [light, dark]. | | language | ConnectLanguage | ❌ | Language code for localization [en, ar]. | | businessCountryCode | string | ❌ | Country ISO2 code of the merchant country. | | showBoard | boolean | ❌ | Show the merchant board UI. | | leadId | string | ❌ | Optional lead ID for loading lead data. | | platforms | string | ❌ | - | | paymentProvider | ConnectPaymentProvider | ❌ | Information about the payment provider configuration. | | — technologyId | string | ✅ | - | | — institutionId | string | ✅ | - | | features | ConnectAppFeatures | ❌ | Additional configuration options for appearance and UI. | | — poweredBy | boolean | ❌ | Show or hide the “Powered by Tap” logo. | | — merchantLogo | boolean | ❌ | Show or hide the merchant’s logo in the widget. | | — closeButton | boolean | ❌ | Display a close button on the widget. | | — dialogStartTransition | ConnectDialogTransition | ❌ | Transition animation when the dialog opens [left,right,up,down]. | | — dialogEndTransition | ConnectDialogTransition | ❌ | Transition animation when the dialog closes [left,right,up,down]. | | — dialogEdgeFormat | ConnectDialogEdgeFormat | ❌ | Controls the shape/format of the dialog edges [curved, straight]. | | postUrl | string | ❌ | Endpoint to post our data to merchant's server. | | redirectUrl | string | ❌ | Redirect URL after success. | | data | string[] | ❌ | Merchant data array (e.g. operator, brand, entity, etc.). | | mode | ConnectMode | ❌ | Controls the display behavior of the Connect Element, using the ConnectMode enum to specify whether it appears as a full page, popup, or display content only. | | notification | ConnectNotification | ❌ | Notification configuration to notify the user after account creation. | | — email | boolean | ✅ | Enable or disable email notifications. | | — sms | boolean | ❌ | Enable or disable mobile SMS notifications. | | boardEditable | boolean | ❌ | Allow merchant board to be editable. | | loginMode | boolean | ❌ | Opens Connect in login/auth mode. | | region | string | ❌ | Region code that changes the target middlware (e.g., sa for Saudi). |


Developed by Tap Payments
🌐 Website · 💬 Support · 💼 LinkedIn