The Unified Payment Engine for the Web
Connect bKash, Nagad, SSLCommerz, and Stripe in minutes.
Write once, accept payments anywhere.
npm install @foxses/payWhat is Foxses Pay?
Foxses Pay is a unified, developer-first payment engine for JavaScript and the Web. Instead of integrating and maintaining separate libraries for bKash, Nagad, SSLCommerz, and Stripe, Foxses Pay bridges them into a single, standardized client API.
Unified API Wrapper
Create checkout URLs, process agreements, and query payments across different gateways using the same configuration structure.
Automated Security
Built-in signature validation and webhook hash integrity checkers prevent billing spoofing out of the box.
Zero Boilerplate
Designed with TypeScript for strict type checking. Connect, verify, and settle payments with just a few lines of clean code.
SDK Core








Supported Providers
Each provider is a separate package — install only what you need.

bKash
BangladeshTokenized Checkout API v1.2.0 — token-based auth, auto refresh.
npm i @foxses/pay-bkash
Nagad
BangladeshCheckout API v0.2.0 — RSA encryption for all sensitive data.
npm i @foxses/pay-nagadSSLCommerz
BangladeshPayment Gateway API v4 — all Bangladeshi cards & mobile banking.
npm i @foxses/pay-sslcommerz
Stripe
GlobalCheckout Session API — 135+ currencies, card payments, webhooks.
npm i @foxses/pay-stripe
PayPal
GlobalOrders API v2 — one-time & recurring payments, buyer protection.
npm i @foxses/pay-paypal
Binance Pay
GlobalBinance Pay API — crypto checkout, QR code, 700+ digital assets.
npm i @foxses/pay-binance
Payeer
GlobalPayeer Merchant API — multi-currency wallet, instant settlements.
npm i @foxses/pay-payeer
Coinbase
GlobalCommerce API — Bitcoin, Ethereum, USDC & more, no account required.
npm i @foxses/pay-coinbase
CoinPayments
GlobalIPN-based API — 2000+ altcoins, multi-coin wallet support.
npm i @foxses/pay-coinpayments
Cryptomus
GlobalCrypto payment gateway — static addresses, recurring billing.
npm i @foxses/pay-cryptomusNOWPayments
GlobalCrypto payment API — accept 150+ cryptocurrencies with sandbox support.
npm i @foxses/pay-nowpaymentsWhy foxses-pay?
A robust, standard wrapper built for speed, safety, and developer efficiency.
Simple API
Three functions — createPayment, verifyPayment, refund. No provider-specific code in your business logic.
Modular
Install only the providers you need. @foxses/pay includes all. Or mix-and-match individual packages.
Type Safe
Full TypeScript support with strict types. Autocomplete for config, params, and responses.
Error Handling
Typed errors — AuthenticationError, ValidationError, NetworkError, ProviderError.
Unified Response
Every provider returns the same PaymentResponse shape. No provider-specific parsing needed.
Switch Providers
Change provider in one line. Your business logic stays the same.