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

@payvizio/web-sdk

v0.1.2

Published

Drop-in checkout SDK for Payvizio. Opens a hosted checkout modal and surfaces payment lifecycle events to the merchant page.

Readme

Payvizio Web SDK

Drop-in checkout for browser-based merchants. Opens a hosted checkout modal and surfaces payment lifecycle events back to your page via callbacks. Card collection happens inside the acquirer's iframe-embedded form, so integrating this SDK keeps your site PCI-out-of-scope.

Install

npm install @payvizio/web-sdk

Or via <script> tag (UMD bundle exposes window.Payvizio):

<script src="https://cdn.payvizio.com/sdk/web/v0/payvizio.umd.js"></script>

Usage

  1. Create a payment session on your server (POST /api/payments from the merchant API).
  2. Hand the returned sessionId to the browser page.
  3. Call Payvizio.checkout({ sessionId, ... }).
const pv = Payvizio.init({
    apiBaseUrl: "https://api.payvizio.com",
});

pv.checkout({
    sessionId: "sess_xxx",
    onSuccess: ({ sessionId, status }) => location.assign("/thanks"),
    onFailure: ({ sessionId, reason }) => alert("Payment failed: " + reason),
    onClose:   () => console.log("user closed checkout"),
});

API

Payvizio.init(options)

| Option | Type | Required | Default | Notes | |------------------|----------|----------|--------------------------------|---------------------------------------| | apiBaseUrl | string | yes | — | e.g. https://api.payvizio.com | | checkoutUrl | string | no | ${apiBaseUrl}/checkout | Override hosted-checkout location. | | pollIntervalMs | number | no | 2500 | Set to 0 to disable polling. |

payvizio.checkout(options)

| Option | Type | Notes | |--------------|--------------------------------|-------------------------------------------------------| | sessionId | string (required) | from POST /api/payments | | theme | { backdropColor, modalRadiusPx } | applies to modal chrome (not the checkout iframe) | | onUpdate | (status) => void | every status change | | onSuccess | (status) => void | terminal success (AUTHORIZED or CAPTURED) | | onFailure | (status) => void | terminal failure (AUTH_FAILED / FAILED / VOIDED) | | onClose | () => void | user dismissed before completion |

Returns { close: () => void } so you can dismiss programmatically.

Lifecycle

sessionId → checkout() → modal opens
                         │
                         ├─ user pays  → AUTHORIZED → onSuccess → modal closes
                         ├─ user fails → FAILED     → onFailure → modal closes
                         └─ user closes            → onClose

The SDK polls GET /api/payments/{sessionId} and listens for postMessage events from the checkout iframe (source = payvizio-checkout). Either source can drive the terminal callback.

What's not in this SDK

  • Direct card collection — happens in the acquirer's iframe inside the modal.
  • 3DS challenge UI — the acquirer hosts the ACS page; the modal navigates the iframe through it transparently.
  • Saved-card management — render server-side before opening the SDK, or use the dashboard.

Versioning

Pre-1.0: API may change between minor versions; pin to a specific version in production.