LNURL-Pay is an application-layer protocol that enables a static QR code or URL to initiate a Lightning payment without requiring the payer to know the invoice amount or description in advance. Unlike BOLT 11 invoices, which encode a fixed amount and expire quickly, LNURL-Pay allows a wallet to fetch a real-time invoice from a server over HTTPS. This pattern powers the majority of web-based Lightning tipping, donation, and withdrawal flows today, including the widely adopted Lightning Address protocol that maps user@domain.com identifiers to LNURL endpoints.

LNURL-Pay and Withdrawal Standards
1. Introduction
LNURL-Pay defines a de facto standard for static QR codes and web-native Lightning interactions, bridging the gap between HTTP servers and Lightning Network payments before BOLT 12 Offers reach widespread deployment.
The standard is not part of the formal BOLT specification process. It emerged from the developer community as a pragmatic solution to the UX limitations of BOLT 11 and is maintained as a set of LUD (LNURL Documents) defining request-response flows for payRequest, withdrawRequest, and related interactions. The withdrawal variant (LNURL-Withdraw) inverts the flow: a service provides a URL that a wallet can use to pull funds out of the service, a pattern common in exchange withdrawals, faucets, and custodial wallet offboarding. Both variants rely on a trusted HTTP server to generate invoices or validate withdrawal requests, introducing a dependency on web infrastructure and TLS that does not exist in pure Lightning interactions.
For builders and operators, LNURL-Pay represents both a critical integration surface and a security boundary. The server that responds to payRequest calls controls the final invoice parameters, meaning a compromised or malicious server can redirect payments, inflate amounts, or degrade privacy by logging payer metadata. Wallet teams must validate TLS certificates, enforce minimum entropy in callback URLs, and handle server unavailability gracefully. Exchange and custody teams implementing LNURL-Withdraw must protect the withdrawal endpoint against replay attacks and unauthorized access, as the URL itself functions as a bearer credential. Chainscore Labs can assess LNURL endpoint security, review withdrawal authorization flows, and help teams plan a migration path to BOLT 12 Offers as that standard matures.
2. Quick Facts
A quick-reference table for the operational and security characteristics of the LNURL-pay and LNURL-withdraw protocols, and their relationship to BOLT 12.
| Area | What changes | Who is affected | Action |
|---|---|---|---|
Protocol Layer | Application-layer standard (LUD-06, LUD-03) built on HTTP; not a BOLT. Operates independently of the Lightning P2P network. | Web developers, wallet teams, payment gateways | Treat as a separate integration surface from the Lightning node. Review HTTP security posture. |
Static QR Model | Enables a static QR code or link that fetches a unique invoice from a server at payment time. Replaces single-use BOLT 11 invoices for donations and tips. | Point-of-sale systems, content creators, non-custodial wallets | Verify server-side invoice generation logic. Ensure the callback URL is served over HTTPS. |
Withdrawal Flow | LNURL-withdraw provides a standardized URI for users to scan and receive funds from a service without the service knowing the user's node ID in advance. | Exchanges, faucets, mining pools, any service sending funds | Audit the withdrawal request signing and amount verification. Validate against replay attacks. |
Security Model | Introduces a trusted HTTP endpoint dependency. A compromised server can phish payments or steal withdrawal requests. | Security engineers, custodians, risk teams | Assess the trust model of the LNURL service provider. Implement strict input validation and TLS pinning. |
Privacy Model | The LNURL server learns the user's IP address and the invoice/node ID at payment time, breaking sender-receiver unlinkability. | Privacy-focused wallets, users, compliance teams | Evaluate privacy trade-offs against BOLT 12 Offers. Warn users about server-side data logging. |
BOLT 12 Relationship | BOLT 12 Offers are a native Lightning protocol alternative that removes the HTTP server dependency, using blinded paths for static, reusable, and private payments. | Protocol architects, wallet developers, merchant services | Plan a migration path from LNURL-pay to BOLT 12 Offers. Chainscore can provide a migration impact analysis. |
Compatibility | LNURL is a de facto standard with wide wallet support. BOLT 12 is a newer protocol standard with growing but not universal adoption. | Wallet developers, exchange integration teams | Support both standards during the transition period. Monitor BOLT 12 adoption status in major implementations. |
Operational Risk | Service unavailability of the LNURL endpoint makes the static QR code non-functional, causing payment failures. | Service operators, infrastructure teams | Implement high-availability architecture for the LNURL endpoint. Monitor endpoint health and latency. |
3. Technical Mechanism
How LNURL-Pay and LNURL-Withdraw use HTTP callbacks to orchestrate Lightning invoice creation and fund retrieval without requiring a persistent node connection.
LNURL-pay and LNURL-withdraw are application-layer protocols that operate over HTTP, bridging the gap between static identifiers (like QR codes or lightning: links) and the dynamic, one-time-use invoice model of the Lightning Network. The core mechanism relies on a client (typically a user's wallet) making an HTTP GET request to a URL encoded in a QR code. This request triggers a server-side script that returns a JSON payload containing a callback URL and metadata. For LNURL-pay, the wallet then issues a second HTTP GET to the callback, which prompts the server to generate a unique BOLT 11 invoice. The wallet pays this invoice, and the server confirms settlement. This two-step handshake decouples the static presentation layer from the ephemeral invoice generation required by the Lightning protocol.
The LNURL-withdraw flow inverts this interaction. A service provides a user with a QR code containing a URL that encodes a pre-signed Lightning invoice (a 'withdrawal request'). The user's wallet scans this code, makes an HTTP GET to the specified URL, and the server responds with a JSON payload detailing the withdrawal amount and a description. The wallet then presents this to the user for approval. Upon confirmation, the wallet sends its own invoice to the server's callback URL, and the server pays that invoice. This mechanism is the operational backbone for withdrawing funds from exchanges, faucets, and tipping services to a non-custodial wallet without the service needing to know the user's node ID or push funds unsolicited. The security model is entirely server-dependent; a wallet must trust the LNURL endpoint to honestly generate and pay invoices, and the communication channel relies on TLS for integrity and confidentiality.
These standards represent a pragmatic but centralized approach to web-native Lightning interactions, which the more decentralized and privacy-preserving BOLT 12 Offers protocol aims to replace. LNURL's reliance on always-online HTTP servers introduces a single point of failure and a persistent privacy leak, as the server learns the user's IP address and can correlate payment requests. For operators and wallet teams, the immediate impact is a dual-stack maintenance burden: supporting the widely deployed LNURL ecosystem while preparing for a migration to BOLT 12. Chainscore Labs can assist builders in this transition by performing a security assessment of LNURL endpoint implementations, auditing the invoice generation and settlement logic for race conditions or replay attacks, and developing a phased migration architecture that maintains backward compatibility with LNURL while incrementally adopting the static, blinded-path-based Offers protocol.
4. Affected Actors
Wallet Developers
Wallet teams must maintain LNURL-pay and LNURL-withdraw support while preparing for BOLT 12 Offers. The immediate challenge is dual-stack maintenance: LNURL for current UX parity and BOLT 12 for future-proofing.
Action items:
- Audit LNURL callback handling for SSRF and injection vectors in
tag:withdrawRequestflows. - Implement BOLT 12 Offer parsing and blinded path construction in parallel.
- Test interoperability between LNURL-auth, LNURL-pay, and emerging BOLT 12 implementations.
- Monitor LNDK, LDK, and Core Lightning for BOLT 12 API stabilization.
Chainscore can review LNURL security models and assess migration impact for wallet teams transitioning to static payment identifiers.
5. Implementation Impact
Practical actions for wallet developers, payment gateways, and service operators integrating or migrating between LNURL-Pay, Lightning Address, and BOLT 12 Offers.
6. Risk Matrix
Operational and security risks introduced by the LNURL-pay and LNURL-withdraw sub-protocols, focusing on trust assumptions, server dependencies, and migration challenges.
| Risk | Failure mode | Severity | Affected actors | Mitigation |
|---|---|---|---|---|
Server compromise | Attacker replaces the LNURL-pay callback payload with their own payment request, causing users to pay the attacker. | Critical | Wallet developers, end-users, payment gateways | Wallets must verify the TLS certificate and domain name of the callback URL. Services should implement strict access controls and monitoring on the web server. |
Callback request manipulation | A man-in-the-middle (MITM) alters the | High | Wallet developers, end-users | Wallets must display the final invoice amount to the user for confirmation. The initial LNURL metadata should be treated as a suggestion, not a binding contract. |
Withdrawal link interception | An attacker intercepts a one-time LNURL-withdraw link (e.g., via email or chat) and redeems the funds before the intended recipient. | Critical | Exchange operators, custodial wallet users | LNURL-withdraw links must be treated as bearer instruments. Services must deliver them over secure channels and invalidate them immediately after the first use attempt. |
Privacy leakage via callback | The LNURL-pay service learns the user's IP address and the time of the interaction when the wallet makes the callback request, linking the user's network identity to a payment intent. | Medium | End-users, privacy-focused wallets | Wallets can warn users that the service will see their IP address. Users can use VPNs or Tor. The protocol does not natively support a privacy-preserving callback mechanism. |
BOLT 12 migration uncertainty | Teams building on LNURL-pay face a future migration to BOLT 12 Offers, which provides a native, non-web-dependent static payment identifier. Investment in LNURL infrastructure may become technical debt. | Medium | Payment gateways, web application developers, merchant tooling | Architect systems with an abstraction layer for static payment identifiers. Begin evaluating BOLT 12 Offers for new projects and plan a parallel support strategy. Verify the current BOLT 12 deployment status against canonical implementation repositories. |
KYC and compliance bypass | A non-custodial service uses LNURL-withdraw to disburse funds without performing identity verification, potentially violating local regulations for money transmission. | High | Exchange operators, fintech integrations, compliance teams | Integrate compliance checks into the LNURL-withdraw flow before generating the withdrawal link. The protocol itself is neutral; the responsibility lies with the implementing service. |
Denial of service on LNURL endpoint | An attacker floods the LNURL-pay callback URL with requests, exhausting server resources and preventing legitimate users from fetching invoices. | Medium | Payment gateways, web application developers | Implement standard web-service rate limiting, DDoS protection, and caching for the LNURL-pay callback endpoint. The endpoint is a standard web server and inherits all standard web security risks. |
7. Operator and Developer Checklist
A practical checklist for wallet developers, payment gateways, and service operators integrating or maintaining LNURL-pay and LNURL-withdraw endpoints. Each item identifies a critical operational or security consideration and the signal that confirms readiness.
LNURL-pay and LNURL-withdraw interactions begin with an HTTPS GET request to a service's callback URL. The security of the entire flow depends on proper TLS and DNS configuration.
- What to check: The service's domain must present a valid, non-expired TLS certificate from a trusted Certificate Authority. The DNS record must resolve correctly and not be vulnerable to hijacking.
- Why it matters: A compromised or misconfigured endpoint allows an attacker to serve a malicious JSON payload, redirecting payment or withdrawal attempts to their own node. This is the single highest-impact failure mode for LNURL services.
- Readiness signal: A successful
curl -v https://your-lnurl-endpoint.com/...command returns a valid certificate chain and the expected JSON response. Automated monitoring should alert on certificate expiry within 14 days.
8. Source Resources
Use these primary sources when implementing or reviewing LNURL-Pay and LNURL-Withdraw. Because LNURL is a collection of de facto application-layer specifications, teams should verify supported LUDs and wallet behavior rather than assume uniform interoperability.
Looking to build on a specific blockchain?
We build smart contracts, DeFi applications, wallets, tokenization platforms, and blockchain infrastructure across the major ecosystems teams choose today. That includes Ethereum, Arbitrum, Optimism, Polygon, Avalanche, Solana, Sui, Aptos, Hedera, Stellar, and NEAR, with support for additional EVM and non-EVM networks based on your product requirements.
EVM ecosystems
- Ethereum
- Arbitrum
- Optimism
- Polygon
- Avalanche
- Cronos

Non-EVM ecosystems
- Solana
- Sui
- Aptos
- Hedera
- Stellar
- NEAR
Additional ecosystems
- Polkadot
- Cosmos
- TON
- Cardano
- Algorand
- Tempo
Also available for Base, appchains, custom EVM networks, and cross-chain product architecture.
9. FAQ
Common operational and integration questions for teams building on or migrating from LNURL-based payment and withdrawal flows.
LNURL-pay relies on a static QR code that resolves to a dynamic invoice via an HTTP server. This introduces a server dependency for every payment: the server can refuse to issue an invoice, log the payer's IP address, or become a denial-of-service target. BOLT 12 Offers remove this interactive server step by encoding the invoice request directly into the static offer, with the payer constructing the payment path via onion routing. The trade-off is that LNURL-pay is simpler to implement today, while Offers require broader Lightning implementation support for blinded paths and onion messaging. Teams should assess whether their threat model tolerates a server in the payment hot path.
Delivering blockchain solutions for 5+ years.
We have partnered with 50+ leading DeFi protocols, NFT ecosystems, and fintech innovators to build secure, scalable, and capital-efficient blockchain products.
Selected Partners & Clients
“I've been working with Chainscore Labs for last 3+ years, they've consistently delivered with strong ownership across multiple projects. The team is reliable and detail-oriented.”
How to get started?
If you're looking for blockchain integration, ChainScore Labs has 5+ years of experience helping teams build and integrate exchanges, wallets, smart contracts, tokenization solutions, and protocol-connected products, we can help you choose the right path, integrate securely, and get to production faster. Our team consists of experienced blockchain developers and architects who can help you with your blockchain integration needs.
Exploration & Strategy
Define your product goals and choose the right blockchain architecture for your use case.
Architecture & Design
Design the smart contracts, tokenomics, and security parameters of your system.
Development & Integration
Build and integrate with wallets, oracles, and front-end dApps for a seamless experience.
Security & Launch
Comprehensive audits followed by a risk-managed mainnet deployment to protect your users.
Discover our
blockchain development services.
We build production-grade blockchain solutions for top-tier projects across DeFi and Web3.
Need a blockchain engineering team?
Send the project context and we will respond with next steps, scope questions, and a practical path to delivery.


