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
ResolveBtcpayInvoiceAsyncno longer queries by OrderId. The invoice controller setsLightningLikePaymentHandler.CurrentBtcpayInvoiceId(anAsyncLocal<string>) before callingCreatePaymentPrompts. The resolution method reads the AsyncLocal and looks up the invoice viaInvoiceRepository.GetInvoice(id), verifyingStoreIdmatch.RelaySession.Extend()signals when new#pkeys arrive;RunAsync()resubscribes immediately instead of waiting for the 30-second tick.ClinkReceiptMonitorrejects preimage-less{"res":"ok"}receipts when the ndebit node differs from the merchant noffer node; accepts only when same-node.The plugin has two separate flows:
nOffer: Business/Merchant side. Used to receive one-time Lightning payments. This is the primary and most common checkout flow.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.here a demo video for the installation and Lightning.Pub Node connection via
nOfferThe video is now available on vimeo https://vimeo.com/1210442921
great addition - hope these plugins will encourage much wider wallet support for CLINK now
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
@AGORA @AG
👀
👀
Based and CLINK pilled