This is the second step of the LNURL-pay flow. After a Lightning wallet fetchesDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nicosaporiti/buda-lightning-invoice/llms.txt
Use this file to discover all available pages before exploring further.
/.well-known/lnurlp/:username and reads the payment parameters, it calls this callback endpoint with the amount the user wishes to pay, expressed in millisatoshis. The server converts that amount to satoshis, creates a Lightning invoice via the Buda.com API, and returns a BOLT11 payment request for the wallet to pay.
Query parameters
Amount to invoice in millisatoshis. Must be an integer greater than or equal to
1000 (i.e., at least 1 satoshi). The server divides this value by 1000 to convert to satoshis before forwarding the request to Buda.com — so amount=10000 creates a 10-satoshi invoice.An optional, user-supplied payment comment up to 140 characters (per LUD-09). Used as the invoice memo. If omitted, defaults to
"Pago desde Lightning Address".Response (200 OK)
The BOLT11 payment request string generated by Buda.com. This is the invoice the wallet should pay. Starts with
lnbc on Bitcoin mainnet.An action object displayed to the user by the wallet after a successful payment, as defined by the LNURL-pay spec.
Always an empty array
[]. This is a standard LNURL-pay response field reserved for routing hints; no hints are needed here.Error responses
Both error types return HTTP 400 Bad Request. Validation error —amount is missing, non-integer, or below 1000 msats:
Examples
RequestAmount conversion
Theamount query parameter must be supplied in millisatoshis, following the LNURL-pay specification. The server internally computes:
amount (msats) | Invoice value (sats) |
|---|---|
1000 | 1 sat |
10000 | 10 sats |
100000 | 100 sats |
100000000 | 100,000 sats |
This endpoint is normally called automatically by Lightning wallets as part of the LNURL-pay protocol — developers rarely need to call it manually. The typical flow is: wallet fetches
/.well-known/lnurlp/:username → wallet calls /callback?amount={msats} → wallet receives and pays the BOLT11 invoice in pr.