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

@unchainedshop/core-payment

v4.6.2

Published

Payment provider management module for the Unchained Engine

Readme

npm version License: EUPL-1.2

@unchainedshop/core-payment

Payment provider module for the Unchained Engine. Manages payment providers, credentials, and payment processing.

Installation

npm install @unchainedshop/core-payment

Usage

import { configurePaymentModule, PaymentProviderType } from '@unchainedshop/core-payment';

const paymentModule = await configurePaymentModule({ db });

// Create a payment provider
const providerId = await paymentModule.create({
  type: PaymentProviderType.CARD,
  adapterKey: 'shop.unchained.payment.stripe',
});

// Find providers for a context
const providers = await paymentModule.findSupported({
  order: orderObject,
});

API Overview

Module Configuration

| Export | Description | |--------|-------------| | configurePaymentModule | Configure and return the payment module |

Queries

| Method | Description | |--------|-------------| | findProvider | Find provider by ID | | findProviders | Find providers with filtering | | count | Count providers | | providerExists | Check if provider exists | | findSupported | Find providers supported for context | | findInterface | Get provider interface definition |

Mutations

| Method | Description | |--------|-------------| | create | Create a new payment provider | | update | Update provider configuration | | delete | Soft delete a provider |

Credentials

| Method | Description | |--------|-------------| | findCredentials | Find stored credentials for user | | createCredentials | Store payment credentials | | deleteCredentials | Remove stored credentials | | markPreferred | Mark credentials as preferred |

Constants

| Export | Description | |--------|-------------| | PaymentProviderType | Provider types (CARD, INVOICE, GENERIC) |

Settings

| Export | Description | |--------|-------------| | paymentSettings | Access payment module settings |

Types

| Export | Description | |--------|-------------| | PaymentProvider | Provider document type | | PaymentCredentials | Credentials document type | | PaymentModule | Module interface type |

Events

| Event | Description | |-------|-------------| | PAYMENT_PROVIDER_CREATE | Provider created | | PAYMENT_PROVIDER_UPDATE | Provider updated | | PAYMENT_PROVIDER_REMOVE | Provider deleted |

Security (PCI DSS)

This module is designed for PCI DSS SAQ-A eligibility:

Tokenization

  • No card data storage: Credit card numbers (PAN) and CVV are never stored
  • Provider tokens only: Only payment provider-issued tokens are stored
  • Secure credentials: Payment credentials contain references, not card data
// PaymentCredentials structure - tokens only, no card data
type PaymentCredentials = {
  paymentProviderId: string;
  userId: string;
  token?: string;        // Provider-issued token (NOT card number)
  isPreferred?: boolean;
  meta: any;             // Provider-specific metadata
};

Payment Flow

All payment integrations use tokenization patterns:

  1. Card data collected by payment provider (Stripe, Datatrans, etc.)
  2. Provider returns secure token
  3. Unchained stores only the token reference
  4. Subsequent charges use the token

See SECURITY.md for complete PCI DSS compliance documentation.

License

EUPL-1.2