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.35-test

Published

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

Downloads

132

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 the Connect element is open or closed. | | publicKey | string | ✅ | Your public API key provided by Tap Payments. | | merchantDomain | string | ✅ | Merchant's domain (e.g. https://example.com). | | scope | ConnectScope | ✅ | Defines the integration scope. | | onReady | () => void | ❌ | Called when the app configurations are loaded successfully. | | onClose | () => void | ❌ | Triggered when the Connect element is closed. | | onError | (error: CustomError) => void | ❌ | Triggered when an error occurs. | | onSuccess | (response: Record<string, string \| number>) => void | ❌ | Triggered when the flow completes successfully. | | theme | ConnectTheme | ❌ | UI theme configuration. | | language | ConnectLanguage | ❌ | Localization language. | | businessCountryCode | string | ❌ | ISO2 country code of the merchant. | | leadId | string | ❌ | ID to Load an existing lead. | | showBoard | boolean | ❌ | Show merchant board UI. | | boardEditable | boolean | ❌ | Allow merchant board editing. | | platforms | string[] | ❌ | List of merchant platforms. | | features | ConnectAppFeatures | ❌ | UI and behavior customization options. | | paymentProvider | ConnectPaymentProvider | ❌ | Payment provider configuration. | | postUrl | string | ❌ | Endpoint to post collected data to your backend. | | redirectUrl | string | ❌ | Redirect URL after success. | | data | string[] | ❌ | Data modules to collect (e.g. brand, entity). | | mode | ConnectMode | ❌ | Controls display behavior (page, popup, content). | | notification | ConnectNotification | ❌ | Notification configuration. | | flow | ConnectFlows | ❌ | Specifies a predefined flow to open directly (e.g., brand, entity, kyc, etc.). | | token | string | ❌ | Connect session token. Required when flow is provided and the flow is not board or auth. | | boardId | string | ❌ | Identifier of the board to load. Required when flow is set to board. | | configToken | string | ❌ | Pre-generated configuration token from backend. | | region | ConnectRegions | ❌ | Region code determining middleware domain. |

ConnectAppFeatures

| Field | Type | Description | | --------------------- | ------------------------- | ------------------------------ | | poweredBy | boolean | Show or hide “Powered by Tap”. | | embedded | boolean | Enable embedded layout mode. | | merchantLogo | boolean | Show or hide merchant logo. | | closeButton | boolean | Display close button. | | dialogStartTransition | ConnectDialogTransition | Dialog opening animation. | | dialogEndTransition | ConnectDialogTransition | Dialog closing animation. | | dialogEdgeFormat | ConnectDialogEdgeFormat | Dialog edge style. |

ConnectPaymentProvider

| Field | Type | Required | Description | | ------------- | -------- | -------- | --------------------------------- | | technologyId | string | ✅ | Payment technology identifier. | | institutionId | string | ✅ | Financial institution identifier. |

ConnectNotification

| Field | Type | Required | Description | | ----- | --------- | -------- | --------------------------- | | email | boolean | ✅ | Enable email notifications. | | sms | boolean | ❌ | Enable SMS notifications. |


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