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

@keychain-pay/send

v1.0.1

Published

Keychain Send Widget - Embeddable remittance for sending money globally to India and more

Readme

@keychain-pay/send

Embeddable widget for sending money globally via Keychain. Add a "Send Money" button to your app in minutes.

Installation

npm install @keychain-pay/send
# or
yarn add @keychain-pay/send
# or
pnpm add @keychain-pay/send

Quick Start

React

import { SendButton } from '@keychain-pay/send/react';

function App() {
  return (
    <SendButton
      onSuccess={(result) => {
        console.log('Payment link created!', result.linkUrl);
        // Share this link with the recipient
      }}
    />
  );
}

Vanilla JavaScript

<script src="https://unpkg.com/@keychain-pay/send"></script>
<button id="send-btn">Send Money</button>

<script>
  const keychain = new KeychainSend({
    onSuccess: (result) => {
      alert('Share this link: ' + result.linkUrl);
    }
  });

  document.getElementById('send-btn').onclick = () => {
    keychain.open();
  };
</script>

React Components

SendButton

Ready-to-use button that opens the send widget.

import { SendButton } from '@keychain-pay/send/react';

<SendButton
  amount={5000}           // Pre-fill $50
  country="IN"            // Recipient country
  variant="primary"       // 'primary' | 'outline' | 'minimal'
  size="md"               // 'sm' | 'md' | 'lg'
  onSuccess={(result) => {
    console.log('Link:', result.linkUrl);
  }}
>
  Send $50 to India
</SendButton>

useSend Hook

For more control over the send flow.

import { useSend } from '@keychain-pay/send/react';

function App() {
  const { open, isOpen, close } = useSend({
    defaultCountry: 'IN',
    onSuccess: (result) => {
      console.log('Success!', result);
    },
  });

  return (
    <div>
      <button onClick={() => open({ amount: 10000 })}>
        Send $100
      </button>
      {isOpen && <p>Widget is open...</p>}
    </div>
  );
}

SendWidget (Inline Embed)

Embed the send flow directly in your page without a modal.

import { SendWidget } from '@keychain-pay/send/react';

<SendWidget
  height={600}
  country="IN"
  onSuccess={(result) => console.log(result)}
/>

Vanilla JavaScript API

KeychainSend Class

import { KeychainSend } from '@keychain-pay/send';

const keychain = new KeychainSend({
  defaultCountry: 'IN',
  onSuccess: (result) => {
    console.log('Link created:', result.linkUrl);
  },
  onError: (error) => {
    console.error('Error:', error.message);
  },
  onClose: () => {
    console.log('Widget closed');
  },
});

// Open the widget
keychain.open({
  amount: 10000,  // $100 in cents
  memo: 'Birthday gift',
});

// Check if open
keychain.isOpen();

// Close programmatically
keychain.close();

// Cleanup
keychain.destroy();

Configuration

| Option | Type | Default | Description | |--------|------|---------|-------------| | baseUrl | string | https://checkout.keychainpay.com | Keychain checkout URL | | defaultCountry | string | IN | Default recipient country | | defaultCurrency | string | INR | Default recipient currency | | onSuccess | function | - | Called when link is created | | onError | function | - | Called on error | | onClose | function | - | Called when widget closes |

SendOptions

Options passed to open():

| Option | Type | Description | |--------|------|-------------| | amount | number | Amount in USD cents (e.g., 10000 = $100) | | memo | string | Description/note for the payment | | country | string | Recipient country code (e.g., 'IN') | | currency | string | Recipient currency code (e.g., 'INR') |

SendResult

Result returned on success:

interface SendResult {
  success: boolean;
  linkId: string;          // Payment link ID
  linkUrl: string;         // Shareable URL
  amountUsd: number;       // Amount in USD cents
  amountRecipient: number; // Amount in recipient currency (smallest unit)
  recipientCurrency: string;
  exchangeRate: number;
  link: object;            // Full link data
}

Supported Countries

Currently supporting remittance to:

  • India (IN) - INR

More countries coming soon.

License

MIT