webln.sendPayment()
Request that the user sends a payment for an invoice. The application needs to provide a BOLT-11 invoice. For an invoiceless payment, use webln.keysend.
Method
async function sendPayment(paymentRequest: string): SendPaymentResponse;Parameters
paymentRequest: string // the invoice you'd like the user to pay (lnbc...)Response
interface SendPaymentResponse {
preimage: string;
}Example
const invoice = "lnbc100...";
const result = await window.webln.sendPayment(invoice);Demo
Last updated
Was this helpful?