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

@paynetworx/3ds-sdk

v2.3.3

Published

A TypeScript library for browsers

Readme

Paynetworx 3DS SDK

A JavaScript SDK for integrating 3D Secure (3DS) authentication into your payment processing applications. for more information see: https://docs.paynetworx.com/3ds/overview/getting-started-guide.html

Overview

The Paynetworx 3DS SDK provides developers with a streamlined way to implement 3D Secure authentication flows in their applications. 3D Secure is a security protocol that adds an additional layer of authentication for online credit and debit card transactions, helping to reduce fraud and increase payment security.

Installation

Install the SDK using npm:

npm install @paynetworx/3ds-sdk

Features

  • Complete 3DS 2.0 Support: Full implementation of the latest 3D Secure protocol
  • Easy Integration: Simple API for quick implementation
  • Secure Authentication: Enhanced security for online card transactions
  • Lightweight: Minimal footprint with essential functionality
  • TypeScript Support: Built with modern JavaScript/TypeScript

Quick Start

import * as sdk from "@paynetworx/3ds-sdk"

const result = await sdk.processPayment({
  paynetworx_url:"<given to you by paynetworx rep>",
  challenge_window_size:sdk.CHALLENGE_WINDOW_SIZE_500_600,
  sendPaymentToBackend: async (browser_info: unknown): Promise<sdk.CallbackResponse<unknown>> => {
    //example implemntation but yours will depend on your backend
    const response = await fetch(`${backend_url}/api/auth`,{
      method:'POST',
      body:JSON.stringify(paymentDetails),
      headers: {
        "Content-Type": "application/json",
      },
    })

    // may need to edit to fit into sdk.CallbackResponse<unknown> shape
    return await response.json() 
  },
  Get3dsMethodResponse: async (threeDSServerTransID: string): Promise<sdk.CallbackResponse<unknown>> => {
    //example implemntation but yours will depend on your backend
    const threeds_method_response = await fetch(`${backend_url}/api/3ds_method/${threeDSServerTransID}`,{
      method:'GET',
    })

    return await threeds_method_response.json()
    // may need to edit to fit into sdk.CallbackResponse<unknown> shape
  },
  StartChallengeCallback: async () =>{
    //example implemntation but yours will depend on your backend
    await waitForElement("#challenge-modal");
    return document.getElementById("challenge-modal")!
  },
  GetChallengeResponse: async (threeDSServerTransID: string): Promise<sdk.CallbackResponse<unknown>> => {
    //example implemntation but yours will depend on your backend

    const challenge_response = await fetch(`${backend_url}/api/challenge/${threeDSServerTransID}`,{
      method:'GET',
    })
    return await challenge_response.json()
    // may need to edit to fit into sdk.CallbackResponse<unknown> shape
  },
  FinishChallengeCallback: async () =>{
    //clean up
  },
})

Examples

For complete implementation examples, check out the 3DS Merchant Example repository, which demonstrates:

  • Frontend payment form integration
  • Backend API implementation
  • Complete 3DS flow handling
  • Docker deployment setup

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

Note: This SDK is designed for secure payment processing. Always follow PCI-DSS compliance requirements and use HTTPS in production environments.