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

@plyaz/payments

v1.2.0

Published

Comprehensive payments processing system for the Plyaz ecosystem with multi-provider support for Web2 & Web3.

Readme

@plyaz/payments

The Unified Payment Engine for the Plyaz Ecosystem.

The @plyaz/payments SDK is a full-stack, enterprise-grade payment processing architecture designed to handle all of your monetary needs—from simple credit card charges to complex blockchain transactions. It provides a unified, type-safe interface for your NestJS backend and Next.js/React frontend, ensuring a secure, scalable, and seamless payment experience.

Why Plyaz Payments?

  • Unified Provider Interface: A single API to rule them all. Integrate once and connect to various providers like Stripe, PayPal, MoonPay, and future Web3 protocols with minimal code changes.
  • Built-in Security & Compliance: Engineered with PCI compliance at its core. We handle the sensitive data so you don't have to, with features like webhook signature verification and robust fraud detection.
  • Intelligent Routing: Maximize success rates and minimize costs. Our smart routing engine automatically selects the best payment provider for each transaction based on performance, cost, and regional rules.
  • Full-Stack Event-Driven Architecture: All transactions, from initiation to completion, are tracked by a comprehensive, event-driven system. Get real-time updates and build responsive user experiences and audit trails effortlessly.
  • Type-Safe from End to End: Leveraging TypeScript across the entire stack, from NestJS DTOs to React component props, to eliminate bugs and ensure a consistent data flow.

📦 Installation

Get started in seconds with your preferred package manager:

Bash

Plain textANTLR4BashCC#CSSCoffeeScriptCMakeDartDjangoDockerEJSErlangGitGoGraphQLGroovyHTMLJavaJavaScriptJSONJSXKotlinLaTeXLessLuaMakefileMarkdownMATLABMarkupObjective-CPerlPHPPowerShell.propertiesProtocol BuffersPythonRRubySass (Sass)Sass (Scss)SchemeSQLShellSwiftSVGTSXTypeScriptWebAssemblyYAMLXML pnpm add @plyaz/payments

🚀 Quick Start

Backend: NestJS Payments Module

Easily integrate the payments module into your NestJS application. The module manages provider adapters, webhooks, and core payment services.

TypeScript

Plain textANTLR4BashCC#CSSCoffeeScriptCMakeDartDjangoDockerEJSErlangGitGoGraphQLGroovyHTMLJavaJavaScriptJSONJSXKotlinLaTeXLessLuaMakefileMarkdownMATLABMarkupObjective-CPerlPHPPowerShell.propertiesProtocol BuffersPythonRRubySass (Sass)Sass (Scss)SchemeSQLShellSwiftSVGTSXTypeScriptWebAssemblyYAMLXML // src/app.module.ts import { Module } from '@nestjs/common'; import { PaymentsModule } from '@plyaz/payments/backend'; @Module({ imports: [ PaymentsModule.forRoot({ // Your payments configuration providers: [ { provider: 'stripe', enabled: true, credentials: { apiKey: process.env.STRIPE_SECRET_KEY, publishableKey: process.env.STRIPE_PUBLISHABLE_KEY, }, // ... more config }, ], // ... other feature flags and settings }), ], }) export class AppModule {}

Frontend: React Custom Hook

Use our custom usePayment hook to orchestrate the entire payment flow in your React components.

TypeScript

Plain textANTLR4BashCC#CSSCoffeeScriptCMakeDartDjangoDockerEJSErlangGitGoGraphQLGroovyHTMLJavaJavaScriptJSONJSXKotlinLaTeXLessLuaMakefileMarkdownMATLABMarkupObjective-CPerlPHPPowerShell.propertiesProtocol BuffersPythonRRubySass (Sass)Sass (Scss)SchemeSQLShellSwiftSVGTSXTypeScriptWebAssemblyYAMLXML // components/Checkout.tsx 'use client'; import React from 'react'; import { usePayment } from '@plyaz/payments/frontend'; import { PaymentForm } from '@plyaz/payments/frontend/components'; function CheckoutPage() { const { processPayment, loading, error, result } = usePayment(); const handlePayment = async (formData) => { try { const paymentResult = await processPayment({ amount: { amount: 1000, currency: 'USD' }, paymentMethod: formData.method, // ... }); // Handle success, e.g., show a confirmation message console.log('Payment completed:', paymentResult); } catch (err) { // The hook handles errors and sets the 'error' state console.error('Payment failed:', err); } }; if (result) { return Payment successful! Transaction ID: {result.transactionId} ; } return ( {error && Error: {error.message} } ); }

⚙️ Architecture

The payments SDK is built on a distributed, package-based architecture to ensure separation of concerns and maximum testability.

Key Architectural Layers

  • @plyaz/payments (This Package): The core payments logic. Contains NestJS services, React hooks, and provider adapters.
  • @plyaz/types: Defines all shared types, interfaces, and enums, ensuring consistency from API requests to database entities.
  • @plyaz/errors: Handles all payment-specific exceptions, providing standardized error codes for consistent feedback and monitoring.
  • @plyaz/events: The heart of our event-driven system. It emits a wide range of payment lifecycle events (e.g., payment.completed, refund.processing, chargeback.received).
  • @plyaz/config: Centralizes all provider credentials, feature flags, and intelligent routing rules.

🛡️ Security by Design

We've built a multi-layered security framework into the core of @plyaz/payments.

  • Webhook Verification: All incoming webhooks from payment providers are automatically validated with HMAC signatures to prevent spoofing and ensure data integrity.
  • Rate Limiting: NestJS guards protect your payment endpoints from abuse and brute-force attacks.
  • Typed Error Handling: The @plyaz/errors integration ensures that security-related failures (e.g., fraud flags, velocity checks) are properly categorized and logged.

🤝 Contributing

We welcome contributions to expand our provider adapters, add new payment methods, or improve our core architecture. Please refer to our CONTRIBUTING.md for guidelines.

📄 License

This project is licensed under the ISC License.