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

@pxpio/web-components-sdk

v2.1.2

Published

<img src="https://files.readme.io/8b472a7a02afbfa6889aa00c54343cf7fe3f97efdeb0a6d1258816be60f35892-pxp-banner1.jpg" alt="PXP banner" style="max-width:100%"><br />

Readme

Checkout Components for Web

Checkout Components allow you to easily build a frictionless checkout experience for your customers. Our fast, secure, and seamless payment components are pieces of the checkout journey that can be integrated to customise, personalise, and expand checkout capabilities.

Components are currently available for:

  • Card: Visa, Mastercard, Amex, Discover, Diners, CUP, and JCB.
  • PayPal: PayPal, Venmo, and PayPal Pay later.

Additional support for Apple Pay is coming soon.

Features

  • Unmatched customisability: Tailor the entire checkout experience to match your brand's look and feel, without limitations.
  • Streamlined integration: Our developer-friendly SDK is easy to integrate into your checkout and gives you full control over the design and function, with the flexibility to scale as needed.
  • Flexible analytics: Track user behaviour and get deeper insights than with rigid Google Analytics setups, thanks to custom events that can be used with your analytics tool of choice.
  • Scalable and secure transactions: We're PCI DSS compliant, with 3DS integration and secure tokenisation for every transaction.
  • Flexible component rendering: Skip rendering certain components entirely and provide your own, while still using PXP’s secure backend to collect information.
  • Future-ready technology: Stay up-to-date with the latest technologies with ongoing updates, including support for card wallets and multilingual features.

Integration process

  1. Set up the relevant Checkout services in the Unity Portal.
  2. Install the latest version of the SDK.
  3. Initialise the SDK.
  4. Create and mount your components.
  5. Add proper handling for events and errors.
  6. Submit and view transactions.

Pre-requisites

  • PXP account and activated Checkout services.
  • Node.js 22.x or higher.

Installation

Run this command to install the library:

npm i @ pxpio/web-components-sdk

Initialisation

To initialise the SDK, you'll need to send a request to the PXP Sessions endpoint and then pass that data back to the front-end. This guide takes you through all the required steps.

Here's an example of the new card component being initialised, created, and mounted.

import { PxpCheckout, NewCardComponent, CurrencyType } from "@pxpio/web-components-sdk";
import { useEffect, useState } from "react";

export default function CreateComponent() {
  const [pxpCheckout, setPxpCheckout] = useState<PxpCheckout>();
  const [newCardComponent, setNewCardComponent] = useState<NewCardComponent>();

  useEffect(() => {
    initialiseTheSdkAsync();
  }, []);

  useEffect(() => {
    // Create and customise components
    setNewCardComponent(pxpCheckout.create("new-card") as NewCardComponent);
  }, [pxpCheckout]);

  useEffect(() => {
    // Mount the new card component
    newCardComponent?.mount("new-card-container");
    return () => {
      // Unmount the new card component
      newCardComponent?.unmount();
    }
  }, [newCardComponent]);

  async function initialiseTheSdkAsync() {
    // 1. Get the session data from the back-end
    const sessionData = await getSessionDataFromBEAsync();

    // 2. Initialise the SDK
    const pxpCheckoutSdk = PxpCheckout.initialize({
      environment: "test",
      session: sessionData,
      ownerId: "Unity",
      ownerType: "MerchantGroup",
      merchantShopperId: "Shopper_01",
      transactionData: {
        currency: "USD" as CurrencyType,
        amount: 25,
        entryType: "Ecom",
        intent: "Authorisation",
        merchantTransactionId: crypto.randomUUID(),
        merchantTransactionDate: () => new Date().toISOString(),
      },
    });

     setPxpCheckout(pxpCheckoutSdk);
  }

  return <>
    <h1 className="text-center">Init SDK</h1>
    <div className="d-flex justify-content-center">
      <div id="new-card-container" style={{ width: "400px" }}></div>
    </div>
  </>;
}

Implementation

Every component follows the same basic three-step lifecycle:

  1. Create the component and optionally add your own configuration. For example, you can implement analytics to monitor your customers' payment journeys.
  2. Mount the component. This is what makes the component visible and interactive.
  3. Unmount the component. This is a clean-up step that clears up resources.

To learn how to implement components, see:

  • Card implementation
  • PayPal implemtnation

Customisation

All components come with responsive and accessible default styling, but are designed to be customisable.

To learn how to customise the look and feel of components, see:

  • Card customisation
  • PayPal customisation

Support

If you have any questions or concerns, reach out to our support team at [email protected].