@axonlabs/payments
v0.2.0
Published
π³ Modular, type-safe payment gateway clients for Node.js apps β including Plisio and more soon. Built with TypeScript and fully ESM-compatible.
Readme
π What is this?
@axonlabs/payments is a unified payment client library for Node.js applications β built with TypeScript, ESM, and modern developer ergonomics in mind.
Whether you're integrating Plisio, Zarinpal (more payment clients will coming soon) this package gives you:
- π§© Gateway-specific clients with type-safe methods
- π Easy plug-and-play usage
- π Common interfaces for consistency
- β‘οΈ Fully tree-shakable via ESM exports
- π¦ Single package, clean structure
π¦ Supported Gateways
| Gateway | Import Path | Status |
|----------------|--------------------------------------|-------------|
| Plisio | @axonlabs/payments/plisio | π§ͺ In progress |
| Zarinpal | @axonlabs/payments/zarinpal | π§ In Future |
Want to contribute a gateway? PRs are welcome!
π§ͺ Example Usage
// Plisio
import { PlisioClient } from '@axonlabs/payments/plisio';
const plisio = new PlisioClient(secret_key, "whitelabel");
// Central hub
import { Payments, AxonPayments } from '@axonlabs/payments';
const plisio1 = Payments.getPlisio(secret_key, "whitelabel");
const plisio2 = new AxonPayments().getPlisio(secret_key, "whitelabel");Each gateway is designed to be self-contained and follow a consistent interface.
π§ Philosophy
- β ESM-first β optimized for modern tooling
- βοΈ Shared interfaces, custom configs, and low-level control
- π§ͺ Testable clients for real-world server environments
- π Multi-gateway ready in a single unified package
π Import Structure
// Plisio
import { PlisioClient } from '@axonlabs/payments/plisio';
// Central hub
import { Payments, AxonPayments } from '@axonlabs/payments';π License
MIT Β© AxonJsLabs
π Contribute
We β€οΈ open-source! Feel free to open issues, suggest improvements, or add new gateway clients.
npm install
npm run build
npm run testWant to add your own gateway (e.g. NowPayments, IDPay, PayPal)? Check the lib/ folder and follow the structure.
