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

@rudiq/payment-widget

v1.0.3

Published

Rudiq Payment Widget - Web3 payment component built with Wagmi and Reown AppKit

Readme

@apex/payment-widget

Web3 payment widget component built with Wagmi, Reown AppKit, and Viem. A simple, ready-to-use React component for accepting crypto payments.

Installation

Production Installation

npm install @apex/payment-widget

Local Development (Testing Before Deployment)

To test the widget in your local project before deploying, you can use one of two methods:

Method 1: npm link (Recommended)

  1. Create a link in the widget directory:
cd /path/to/apex-payment-widget
npm run build
npm link
  1. Use the link in your project:
cd /path/to/your-project
npm link @rudiq/payment-widget
  1. Usage:
import { RudiqPaymentWidget } from '@rudiq/payment-widget'
  1. When you make changes, rebuild in the widget directory:
cd /path/to/apex-payment-widget
npm run build
# or for watch mode:
npm run dev
  1. To remove the link:
cd /path/to/your-project
npm unlink @rudiq/payment-widget

Method 2: Local Path (Alternative)

Specify the path directly in your package.json:

{
  "dependencies": {
    "@rudiq/payment-widget": "file:../apex-payment-widget"
  }
}

Then:

npm install

Quick Start

React

import { RudiqPaymentWidget } from '@rudiq/payment-widget'
import { useState } from 'react'

function App() {
  const [isOpen, setIsOpen] = useState(false)

  return (
    <>
      <button onClick={() => setIsOpen(true)}>Open Payment Widget</button>
      <RudiqPaymentWidget
        host="https://api.example.com"
        paymentId="your-payment-id"
        token="your-bearer-token"
        isOpen={isOpen}
        onClose={() => setIsOpen(false)}
      />
    </>
  )
}

Vue

<template>
  <div>
    <button @click="isOpen = true">Open Payment Widget</button>
    <RudiqPaymentWidget
      host="https://api.example.com"
      :paymentId="'your-payment-id'"
      :token="'your-bearer-token'"
      :isOpen="isOpen"
      @close="isOpen = false"
    />
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import RudiqPaymentWidget from '@rudiq/payment-widget/vue'

const isOpen = ref(false)
</script>

Props

RudiqPaymentWidget

  • host (string, required): Base URL for the payment widget (e.g., "https://api.example.com")
  • paymentId (string, required): Payment ID for the payment
  • token (string, required): Bearer token for API authentication
  • isOpen (boolean, required): Controls the visibility of the widget modal
  • onClose (function, required): Callback function called when the widget is closed
  • clientId (string, optional): Client ID for the payment
  • className (string, optional): Additional CSS classes
  • width (string | number, optional): Modal width. Default: "90%"
  • height (string | number, optional): Modal height. Default: "90%"
  • title (string, optional): Modal title. Default: "Ödeme"
  • zIndex (number, optional): Modal z-index. Default: 9999

Features

  • 📦 Iframe-based payment widget (all payment logic handled in iframe)
  • 🔒 Secure token-based authentication
  • 📱 Responsive modal design
  • 🎨 Customizable appearance (width, height, title, z-index)
  • ⌨️ ESC key support for closing
  • 🖱️ Click outside to close
  • ⚡ Lightweight and easy to integrate
  • 🔄 Loading states

Widget URL

The widget creates an iframe URL by appending /widget to the host URL:

  • Host: https://api.example.com → Widget URL: https://api.example.com/widget?paymentId=...&token=...
  • Host: https://api.example.com/ → Widget URL: https://api.example.com/widget?paymentId=...&token=...

The iframe URL includes the following query parameters:

  • paymentId: Payment identifier
  • token: Bearer token for authentication
  • clientId: (optional) Client identifier

Requirements

  • React 18+ or 19+ (for React component)
  • Vue 3+ (for Vue component)
  • Backend API endpoint that serves the payment widget at /widget path

License

MIT