🚀 Socket Launch Week Day 4:Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection.Learn more
Sign In

@powforge/paymcp-l402-provider

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@powforge/paymcp-l402-provider

Lightning L402 payment provider for paymcp — drop-in LNBits backend for @price() and @subscription() decorators

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

@powforge/paymcp-l402-provider

LNBits Lightning payment provider for paymcp — drop-in backend for @price() and @subscription() decorators.

Install

npm install @powforge/paymcp-l402-provider

Usage

const { LnbitsPaymentProvider } = require('@powforge/paymcp-l402-provider');

const provider = new LnbitsPaymentProvider({
  lnbitsUrl: process.env.LNBITS_URL,
  lnbitsApiKey: process.env.LNBITS_INVOICE_KEY,
  satsAmount: 21,
});

Wire it into paymcp:

const { PayMCP } = require('paymcp');

PayMCP(mcp, { providers: [provider] });

The satsAmount config controls how many sats are charged per call. The amount and currency arguments from paymcp are accepted but ignored — Lightning invoices are denominated in sats, not fiat.

API

new LnbitsPaymentProvider(config)

  • lnbitsUrl (string, required) — LNBits instance URL (e.g. https://lnbits.example)
  • lnbitsApiKey (string, required) — Invoice/read key (NOT admin key)
  • satsAmount (number, default 10) — Sats charged per payment
  • fetchImpl (function, optional) — Inject for tests; defaults to globalThis.fetch

createPayment(amount, currency, description) => Promise<{ payment_id, payment_url }>

Mints a Lightning invoice. The amount and currency arguments are ignored; sats come from config.

getPaymentStatus(payment_id) => Promise<'paid'|'pending'>

Returns 'paid' when LNBits reports the invoice settled, 'pending' otherwise.

License

MIT

Keywords

paymcp

FAQs

Package last updated on 16 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts