Merchantsjs
A framework agnostic, multi-gateway payment processing library for node.js, like Omnipay for php or ActiveMerchants for ruby
Install / Use
/learn @garbin/MerchantsjsREADME
merchants for Node.js
merchants is a framework agnostic, multi-gateway payment processing library for node.js, like Omnipay for php or ActiveMerchant for ruby
Gateways support currently
Installation
npm i merchants
Usage
Initialize
const { Merchants, gateways: { Stripe } } = require('merchants')
const merchants = new Merchants()
merchants.use(new Stripe({
key: 'YOUR STRIPE KEY HERE'
}))
merchants.use(new Alipay({
// ...alipay config here
}))
Make a sync request & Grab the response
const request = merchants.using('stripe').purchase({
amount: 100
}, {
currency: 'usd',
// ...stripe charges create options here
})
const response = await request.send()
if (response.success) {
// do some staff when success
console.log(response.body)
}
Make an async request & Grab the response
const request = merchants.using('alipay').purchase({
amount: 100
}, {
currency: 'usd',
// ...stripe charges create options here
})
const redirect = request.redirect()
// form koa
// ctx.body = redirect
Related Skills
node-connect
347.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.6kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
