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

tandipay-sdk

v1.0.3

Published

TandiPay Payment Gateway SDK for Node.js, React, Vue, and Vanilla JavaScript

Readme

TandiPay SDK

Unified payment gateway SDK for Web & Mobile Accept Mobile Money and Bank Payments seamlessly across your stack.

npm version license downloads


Why TandiPay?

TandiPay simplifies payments for developers building in Africa-first ecosystems, with a strong focus on Mobile Money (MTN, Airtel) and modern frontend frameworks.

  • One SDK, Multiple Platforms
  • Mobile Money + Bank Transfers
  • Secure by Default (Webhook Signing, Token Handling)
  • Simple API, Fast Integration
  • Lightweight + Tree-shakable
  • Subscriptions & Recurring Billing
  • Built-in Transaction Tracking

Supported Platforms

  • Node.js (Express, NestJS, etc.)
  • React / Next.js
  • Vue 3
  • React Native
  • Vanilla JavaScript (CDN)

Installation

Node.js / Backend

npm install tandipay-sdk

Frontend (React / Vue)

npm install tandipay-sdk axios

React Native

npm install tandipay-sdk axios react-native-inappbrowser-reborn @react-native-async-storage/async-storage
cd ios && pod install

CDN (Vanilla JS)

<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/tandipay-sdk/dist/index.umd.js"></script>

Quick Start

1. Initialize SDK

import TandiPay from 'tandipay-sdk';

const tandipay = new TandiPay({
  apiKey: process.env.TANDIPAY_API_KEY,
  environment: 'sandbox', // or 'production'
});

2. Create Payment

const payment = await tandipay.initializePayment({
  phone: '256712345678',
  amount: 1500,
  customer: {
    name: 'John Doe',
    email: '[email protected]'
  },
  returnUrl: 'https://yourdomain.com/callback',
});
window.open(payment.paymentLink);

3. Verify Payment

const result = await tandipay.verifyPayment(payment.reference);

if (result.status === 'successful') {
  console.log('Payment complete');
}

4. Handle Webhooks (Recommended)

app.post('/webhook/tandipay', async (req, res) => {
  try {
    const event = tandipay.handleWebhook(
      JSON.stringify(req.body),
      req.headers
    );

    if (event.status === 'successful') {
      // update order
    }

    res.json({ received: true });
  } catch (err) {
    res.status(400).json({ error: err.message });
  }
});

Frontend Example (React)

import { TandiPayProvider, TandiPayButton } from 'tandipay-sdk/react';

export default function App() {
  return (
    <TandiPayProvider config={{ apiKey: 'your-key' }}>
      <TandiPayButton
        paymentOptions={{
          phone: '256712345678',
          amount: 2000,
          customer: { name: 'Jane Doe' }
        }}
        onSuccess={(res) => console.log(res)}
        onError={(err) => console.error(err)}
      />
    </TandiPayProvider>
  );
}

Advanced Features

Subscriptions

await tandipay.createSubscription({
  customer_id: 'cus_123',
  amount: 50000,
  frequency: 'monthly'
});

Bulk Payments

await tandipay.bulkPayments([
  { phone: '2567...', amount: 1000 },
  { phone: '2567...', amount: 2000 }
]);

API Overview

Core Methods

| Method | Description | | ----------------- | ------------------ | | initializePayment | Start a payment | | verifyPayment | Confirm payment | | handleWebhook | Verify webhook | | generateReference | Create unique ref | | requestRefund | Refund transaction |


Payment Object

{
  phone: string,
  amount: number,
  customer: {
    name: string,
    email?: string
  },
  reference?: string,
  returnUrl?: string,
  callback_url?: string,
  metadata?: object
}

Testing

Use sandbox mode:

environment: 'sandbox'

Test Numbers

| Scenario | Number | | -------- | ------------ | | Success | 256712345678 | | Failed | 256798765432 | | Pending | 256711223344 |


Best Practices

  • Never expose API keys in frontend
  • Always verify payments server-side
  • Use webhooks (don’t rely on polling only)
  • Implement idempotency for webhook handling
  • Log transactions for audit

Support


License

MIT License © TandiPay


Contributing

PRs are welcome. Please follow the contribution guidelines.


Built for African Payments

TandiPay is optimized for real-world payment flows across Mobile Money ecosystems, enabling developers to build reliable fintech products faster.# TandiPay-JS-SDK