Module 3 of 4
Lightning Integration
Technical options for integrating Lightning payments into business operations, from simple to advanced.
Lightning is the payment layer that makes bitcoin practical for business. Base-layer bitcoin is excellent for treasury settlement and large transfers. Lightning is for the point of sale, the e-commerce checkout, the subscription payment, and the invoice.
Three Levels of Integration
Level 1: BTCPay Server (Recommended Start)
BTCPay Server includes a built-in Lightning node. When you deploy a BTCPay instance, you can enable Lightning alongside on-chain payments. Your store generates both payment types automatically. Customers choose which to use. Settlement from Lightning arrives in your BTCPay wallet instantly.
This is the right starting point for most businesses. It requires no custom development, handles both on-chain and Lightning, and provides accounting exports. The entire setup is open-source and non-custodial.
Level 2: Lightning Address
A Lightning Address looks like an email address (e.g., shop@yourdomain.com) and allows anyone to send you Lightning payments without generating an invoice first. It is a simple receive endpoint, useful for tips, donations, and informal payments.
BTCPay Server supports Lightning Addresses natively. You can also set one up through services like Alby or your own LNDhub instance. For businesses, the Lightning Address is most useful as a secondary receive channel — for example, printed on business cards or on a website "tip jar."
Level 3: Custom API Integration
For businesses with development resources, Lightning can be integrated directly into existing systems via APIs. The main options:
- LND (Lightning Network Daemon) — the most mature Lightning implementation. Provides a REST and gRPC API for generating invoices, checking payment status, and managing channels.
- CLN (Core Lightning) — a modular, plugin-based Lightning implementation. More flexible for custom workflows.
- Voltage — a managed Lightning node provider that handles the infrastructure. You interact via API; they handle uptime, backups, and channel management.
- Strike API — a custodial option that converts Lightning payments to fiat automatically. Simplest integration but introduces a custodian.
Custom integration is appropriate for businesses processing high volumes, running subscription models, or embedding payments into software products. For most small and medium businesses, BTCPay Server provides everything needed without custom code.
Channel Management
Lightning channels require liquidity — both outbound (to send) and inbound (to receive). For a business primarily receiving payments, the main concern is inbound liquidity: ensuring there is enough capacity on the receiving side of your channels to accept customer payments.
BTCPay Server handles basic liquidity management automatically. For higher volumes, services like Lightning Pool and Magma allow you to acquire inbound liquidity from the Lightning marketplace. This is a solved problem at typical small-business payment volumes.