pull down to refresh

After our previous Woo-CLINK plugin for WordPress and WooCommerce, we thought it would be worth having a BTCPay Server plugin that lets merchants accept Lightning payments via the CLINK protocol (no HTTP calls). Customers pay with any CLINK-aware wallet (like ZEUS, Amethyst and Electrum, for now). All communication flows over Nostr relays. No web server required for your Lightning node.

The merchant generates a noffer1... string from their CLINK-compatible node, the plugin requests a BOLT11 invoice over Nostr, customer scans the QR and pays. Pretty straightforward, as most of us are used to doing when buying products with lightning online.

For subscriptions, customers provide a nDebit string during checkout, enabling sats to be deducted directly from the authorized wallet on auto-renew.

Features include client-side invoice generation, configurable timeouts, support for fixed or live CoinGecko BTC rates, and multiple relay support for redundancy.

Code is MIT licensed. Docs at https://github.com/WoompaLoompa/btcpay-clink/wiki

v1.2.1 is out!

https://github.com/WoompaLoompa/btcpay-clink/releases#release-v1.2.1

What's Changed

  • AsyncLocal mandate binding — ResolveBtcpayInvoiceAsync no longer queries by OrderId. The invoice controller sets LightningLikePaymentHandler.CurrentBtcpayInvoiceId (an AsyncLocal<string>) before calling CreatePaymentPrompts. The resolution method reads the AsyncLocal and looks up the invoice via InvoiceRepository.GetInvoice(id), verifying StoreId match.
  • Relay session immediate resubscribe — RelaySession.Extend() signals when new #p keys arrive; RunAsync() resubscribes immediately instead of waiting for the 30-second tick.
  • Preimage-less same-node gate — ClinkReceiptMonitor rejects preimage-less {"res":"ok"} receipts when the ndebit node differs from the merchant noffer node; accepts only when same-node.
reply

The plugin has two separate flows:

  1. nOffer: Business/Merchant side. Used to receive one-time Lightning payments. This is the primary and most common checkout flow.
  2. nDebit: Customer side. Used for subscription auto-renewals. When a customer wants to set up recurring payments, they provide their nDebit string during checkout, which authorizes the merchant's plugin to deduct sats automatically on renewal.
reply

here a demo video for the installation and Lightning.Pub Node connection via nOffer

reply

The video is now available on vimeo https://vimeo.com/1210442921

reply

great addition - hope these plugins will encourage much wider wallet support for CLINK now

reply

The plugin can now be found in the BTCpay plugins directory. Leave a review if you test it.

https://plugin-builder.btcpayserver.org/public/plugins/clink

reply
reply
2 sats \ 0 replies \ @AG 12 Jul

👀

reply
61 sats \ 0 replies \ @justin_shocknet 12 Jul -420 sats

Based and CLINK pilled