Pay with Lexe links
A Pay with Lexe link opens a payment code directly in the Lexe app, so your users can pay without scanning a QR code or copy-pasting:
https://lexe.app/pay?to=lightning%3Alnbc1...
When to use them
Use a Pay with Lexe link for a "Pay with Lexe" button on your checkout page,
or a payment link you send to a customer who uses Lexe.
Unlike a lightning: or bitcoin: link, which opens whichever wallet the
device picks, if any, a Pay with Lexe link targets Lexe and works on any
device:
- Phone with Lexe: The link opens the payment in the Lexe app. Where it can't, as in some in-app browsers, a lexe.app page offers an "Open in Lexe" button.
- Phone without Lexe: A lexe.app page helps the user install Lexe, or copy the payment code into another wallet.
- Desktop: A lexe.app page shows a QR code to scan with a phone.
To accept payments from other wallets too, keep showing the bare payment code, as a QR code or a copy button.
If your app already holds a spend-scoped credential for the user's wallet, for example via LexeConnect, it can pay with the SDK directly instead.
Building a link
Percent-encode the payment code into the to query parameter:
Without encoding, the & in a BIP 321 URI like
bitcoin:bc1...?amount=0.0001&lightning=lnbc1... would end the to
parameter, silently dropping the Lightning invoice.
Use exactly https://lexe.app/pay; www.lexe.app links don't open the app.
Other query parameters, such as utm_source, are ignored.
The to parameter accepts any payment code the Lexe app can pay:
- BIP 321 URI:
bitcoin:bc1... - Lightning URI:
lightning:lnbc1... - BOLT 11 invoice:
lnbc1... - BOLT 12 offer:
lno1... - On-chain address:
bc1... - Human Bitcoin Address:
â‚¿satoshi@lexe.app - Lightning Address:
satoshi@lexe.app - LNURL-pay:
lnurl1...orlnurlp://domain.com/path
lexe: links
Pay with Lexe links can only make payments.
To let users withdraw funds into their Lexe wallet via LNURL-withdraw, use a
lexe: link, which accepts both payments and withdrawals:
lexe:lnurlw://service.com/withdraw?...
A lexe: link is the payment code prefixed with lexe: (or lexe://),
without percent-encoding.
It only works on a device with the Lexe app installed, with no fallback page.
Like a lightning: link, any app can register the lexe: scheme and
intercept it, so prefer Pay with Lexe links for payments.
Limitations
- Neither link can wrap an auth request, such as a LexeConnect request or LNURL-auth. Use the auth request on its own.
- Links can't be nested, as in
lexe:https://lexe.app/pay?to=....