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

fundly-payment-sdk

v1.0.0

Published

Fundly Payment SDK - A comprehensive React component library for payment processing

Readme

@fundly/payment-sdk

A comprehensive React component library for payment processing with Fundly's payment gateway services.

Features

  • 🚀 Multiple Payment Methods: Cash, Cheque, QR Code, Payment Links, and Fundly Pay
  • 📱 Mobile Optimized: Built with responsive design for mobile-first experience
  • 🎨 Material-UI Components: Beautiful, accessible UI components
  • 📷 Camera Integration: Built-in camera functionality for cheque capture
  • 🔒 Secure: Built-in authentication and secure API communication
  • 📦 TypeScript: Full TypeScript support with type definitions

Installation

npm install @fundly/payment-sdk

Peer Dependencies

This package requires React 18+ as a peer dependency:

npm install react react-dom

Quick Start

import React from 'react';
import { PaymentOptionPage } from '@fundly/payment-sdk';

function App() {
  return (
    <div>
      <PaymentOptionPage />
    </div>
  );
}

export default App;

Components

PaymentOptionPage

The main component that provides a complete payment options interface.

import { PaymentOptionPage } from '@fundly/payment-sdk';

<PaymentOptionPage />

Individual Payment Drawers

You can also use individual payment method components:

import {
  CashDrawer,
  ChequeDrawer,
  FundlyPayDrawer,
  ScanQrDrawer,
  PaymentLinkDrawer,
  GenerateQrDrawer
} from '@fundly/payment-sdk';

// Cash payment
<CashDrawer
  open={isOpen}
  onClose={() => setIsOpen(false)}
  onPaymentCollected={(response) => console.log('Payment completed', response)}
/>

// Cheque payment with camera integration
<ChequeDrawer
  open={isOpen}
  onClose={() => setIsOpen(false)}
  onPaymentCollected={(response) => console.log('Cheque payment completed', response)}
/>

Configuration

Setting Up Payment Configuration

Before using the payment components, configure the payment details:

import {
  setDistributorIdnum,
  setChemistId,
  setPayableValue,
  setPaymentType,
  setTypeOfApp
} from '@fundly/payment-sdk';

// Configure payment details
setDistributorIdnum('D20000539DE');
setChemistId('R20001029MH');
setPayableValue('1000');
setPaymentType('INVOICE_COLLECT');
setTypeOfApp('CUSTOMER_APP');

Authentication

Set up authentication token:

import { setAccessToken } from '@fundly/payment-sdk';

setAccessToken('your-jwt-token');

API Reference

Components Props

Common Drawer Props

interface DrawerProps {
  open: boolean;
  onClose: () => void;
  onPaymentCollected?: (paymentResponse?: PaymentResponse) => void;
}

PaymentResponse Interface

interface PaymentResponse {
  status: 'success' | 'failed' | 'pending';
  data?: any;
  message?: string;
}

Utility Functions

Configuration Functions

  • setDistributorIdnum(id: string) - Set distributor ID
  • setChemistId(id: string) - Set chemist business ID
  • setPayableValue(amount: string) - Set payment amount
  • setPaymentType(type: string) - Set payment type
  • setTypeOfApp(type: string) - Set application type

Authentication Functions

  • setAccessToken(token: string) - Set JWT token
  • getAccessToken() - Get current JWT token

Payment Methods

1. Cash Payment

Simple cash payment recording with receipt generation.

2. Cheque Payment

Cheque payment with:

  • Date picker for cheque date
  • Cheque number input
  • Camera integration for cheque image capture
  • Gallery/file selection option

3. Fundly Pay

One-click payment solution with:

  • Tenure selection
  • Instant payment processing
  • Eligible amount display

4. QR Code Payments

  • Static QR: Scan existing QR codes
  • Dynamic QR: Generate new QR codes for payments

5. Payment Links

Generate and share payment links for remote payments.

Styling

The package includes default styles. Make sure to import the CSS:

import '@fundly/payment-sdk/dist/style.css';

Customization

The components use Material-UI and Tailwind CSS. You can customize the theme by:

  1. Overriding CSS variables
  2. Using Material-UI theme customization
  3. Adding custom Tailwind classes

Mobile Features

  • Camera Integration: Native camera access for document capture
  • Responsive Design: Optimized for mobile devices
  • Touch-friendly: Large touch targets and intuitive gestures
  • Hardware Back Button: Support for Android hardware back button

Browser Support

  • Chrome 70+
  • Firefox 65+
  • Safari 12+
  • Edge 79+

Build and Publishing

To build the library:

npm run build:lib

To publish to npm:

npm publish

Contributing

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

License

MIT © Fundly

Support

For support, email [email protected] or call +91-9892422528.