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

@payotex.com/checkout

v1.0.1

Published

Client-side checkout widget for Payotex crypto payments

Readme

@payotex.com/checkout

Client-side checkout widget for Payotex crypto payments. Provides a React component and vanilla JS function to embed the Payotex payment widget on any website.

Installation

npm install @payotex.com/checkout

Quick Start

React

import { PayotexCheckout } from '@payotex.com/checkout';

// Session mode (recommended for server-side session creation)
function CheckoutPage({ sessionId }: { sessionId: string }) {
  return (
    <PayotexCheckout
      sessionId={sessionId}
      onLoad={() => console.log('Widget loaded')}
      onError={(err) => console.error('Widget error:', err)}
    />
  );
}

// Publishable key mode (client-side session creation)
function QuickCheckout() {
  return (
    <PayotexCheckout
      publishableKey="pk_live_your_key_here"
      amount="49.99"
      currency="USD"
      buttonText="Pay with Crypto"
    />
  );
}

Vanilla JavaScript

import { loadPayotexCheckout } from '@payotex.com/checkout';

const container = document.getElementById('checkout-container');

const cleanup = loadPayotexCheckout(container, {
  sessionId: 'your-session-id',
  onLoad: () => console.log('Widget loaded'),
  onError: (err) => console.error('Error:', err),
});

// Call cleanup() when you want to remove the widget

Framework Examples

Next.js

'use client';
import { PayotexCheckout } from '@payotex.com/checkout';

export default function CheckoutPage({ params }: { params: { sessionId: string } }) {
  return (
    <div>
      <h1>Complete Your Payment</h1>
      <PayotexCheckout
        sessionId={params.sessionId}
        onError={(err) => console.error(err)}
      />
    </div>
  );
}

Plain HTML (via CDN / bundler)

<div id="payotex-checkout"></div>

<script type="module">
  import { loadPayotexCheckout } from '@payotex.com/checkout';

  loadPayotexCheckout(document.getElementById('payotex-checkout'), {
    publishableKey: 'pk_live_your_key_here',
    amount: '25.00',
    currency: 'USD',
  });
</script>

Props / Options Reference

| Option | Type | Required | Default | Description | |---|---|---|---|---| | publishableKey | string | Conditional | — | Your publishable key (pk_live_...). Required if no sessionId. | | sessionId | string | Conditional | — | Pre-created checkout session ID. Required if no publishableKey. | | amount | string \| number | Conditional | — | Payment amount. Required when using publishableKey without sessionId. | | currency | string | No | "USD" | Currency code: USD, EUR, GBP. | | buttonText | string | No | "Pay with Crypto" | Custom text for the payment button. | | baseUrl | string | No | "https://payotex.com" | Base URL for the Payotex API. | | onLoad | () => void | No | — | Called when the widget script has loaded. | | onError | (error: Error) => void | No | — | Called on errors (load failures, validation errors). |

React-only Props

| Prop | Type | Description | |---|---|---| | className | string | Additional CSS class for the container div. | | style | React.CSSProperties | Inline styles for the container div. |

Security

  • Never use your secret key (sk_live_...) in client-side code. The SDK will throw a SECURITY ERROR if a secret key is detected.
  • Use your publishable key (pk_live_...) for client-side integrations.
  • Secret keys must only be used server-side with the @payotex.com/node SDK.
  • For maximum security, create checkout sessions server-side and pass the sessionId to the client.

TypeScript Support

This package includes full TypeScript type definitions. All types are exported:

import type { PayotexCheckoutOptions, PayotexCheckoutProps } from '@payotex.com/checkout';

How It Works

The SDK dynamically injects the Payotex widget.js script with the appropriate data-* attributes. The widget script handles the entire checkout UI including:

  • Chain/asset selection
  • Quote generation
  • QR code display
  • Payment address and memo
  • Real-time transaction tracking
  • Payment confirmation

License

MIT