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 🙏

© 2025 – Pkg Stats / Ryan Hefner

swypt-checkout

v0.1.43

Published

A customizable checkout SDK for Swypt payments

Downloads

113

Readme

Swypt Checkout SDK

Overview

Swypt Checkout SDK is a customizable, easy-to-integrate payment solution for e-commerce and point-of-sale applications. It provides a seamless checkout experience for customers using cryptocurrencies and traditional payment methods, along with comprehensive transaction management capabilities.

Features

  • Multi-step checkout process
  • Deposit and withdraw functionality
  • Transaction history tracking and management
  • Support for both crypto and cash payments
  • Customizable header with gradient support
  • Responsive design (mobile and desktop compatible)
  • Wallet integration for crypto payments
  • Transaction confirmation and receipt generation
  • Real-time transaction status updates
  • Search and filter transaction history
  • Downloadable and shareable transaction receipts

Installation

yarn add swypt-checkout 

Getting Started

To start using the Swypt Checkout SDK in your project, follow these steps:

  1. Install the SDK: Use npm or yarn to install the package as shown above.
  2. Import the SDK components:
import { DepositModal, WithdrawModal, TransactionHistoryModal } from "swypt-checkout";
import "swypt-checkout/dist/styles.css";
  1. Set up the CryptoProvider in your project's entry file:
"use client"

import { CryptoProvider } from "swypt-checkout";

export default function RootLayout({ children }) {
  return (
    <CryptoProvider>
      <html>
        <body>{children}</body>
      </html>
    </CryptoProvider>
  );
}
  1. Implement the modals in your component:
import { useState } from "react";

function YourComponent() {
  const [isDepositOpen, setIsDepositOpen] = useState(false);
  const [isWithdrawOpen, setIsWithdrawOpen] = useState(false);
  const [isHistoryOpen, setIsHistoryOpen] = useState(false);

  const merchantAddress = "0x6d19a24D93379D1bA58d28884fFBBEf1bc145387";

  return (
    <div>
      {/* Action Buttons */}
      <div className="flex gap-4">
        <button onClick={() => setIsDepositOpen(true)}>Deposit</button>
        <button onClick={() => setIsWithdrawOpen(true)}>Withdraw</button>
        <button onClick={() => setIsHistoryOpen(true)}>Transaction History</button>
      </div>

      {/* Modals */}
      <DepositModal
        isOpen={isDepositOpen}
        onClose={() => setIsDepositOpen(false)}
        headerBackgroundColor="#3E4347"
        businessName="Your Business Name"
        merchantName="Your Merchant Name"
        merchantAddress={merchantAddress}
        amount={200}
      />

      <WithdrawModal
        isOpen={isWithdrawOpen}
        onClose={() => setIsWithdrawOpen(false)}
        headerBackgroundColor="#3E4347"
        businessName="Your Business Name"
      />

      <TransactionHistoryModal
        isOpen={isHistoryOpen}
        onClose={() => setIsHistoryOpen(false)}
        headerBackgroundColor="#3E4347"
        businessName="Your Business Name"
        merchantAddress={merchantAddress}
      />
    </div>
  );
}

Process Flows

Deposit Flow

  1. Asset Selection: Choose cryptocurrency for deposit
  2. Choose Method: Select payment method
  3. Phone Entry: Enter your phone number
  4. Confirm Transaction: Review deposit details
  5. Processing: Complete the deposit
  6. Success: View and download the receipt

Withdraw Flow

  1. Connect Wallet: Link your digital wallet
  2. Asset Selection: Choose cryptocurrency to withdraw
  3. Confirm Transaction: Review withdrawal details
  4. Processing: Complete the withdrawal
  5. Success: View and download the receipt

Transaction History Flow

  1. Connect Wallet: Verify merchant wallet
  2. View History: Access all deposit and withdrawal transactions
  3. Filter Transactions: Filter by type (deposit/withdraw)
  4. Search: Search through transactions
  5. View Details: See complete transaction details

Requirements

  • React 16.8+
  • Next.js 10+ (for optimal performance)
  • Web3 wallet (MetaMask, WalletConnect, etc.)

Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)
  • Mobile browsers with wallet support

Best Practices

  • Ensure proper error handling for all transaction types
  • Implement appropriate wallet connection error handling
  • Test thoroughly with different payment scenarios
  • Keep transaction history updated in real-time
  • Maintain proper state management for modals
  • Handle wallet disconnection gracefully

Security

Swypt Checkout SDK prioritizes security in financial transactions:

  • Secure wallet connections
  • Protected transaction data
  • Verified merchant addresses
  • Encrypted communication
  • Regular security updates

Troubleshooting

Common issues and solutions:

  • Wallet Connection: Ensure proper Web3 provider setup
  • Transaction History: Verify merchant address authentication
  • Modal Display: Check z-index and modal stack order
  • Styling: Ensure proper CSS import and compatibility
  • API Endpoints: Verify correct backend configuration

Support

For technical support and inquiries:

License

This project is licensed under the MIT License - see the LICENSE file for details.