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

async function sendPayment(paymentRequest: string): SendPaymentResponse;

Response

interface SendPaymentResponse {
preimage: string;
}

Example

const invoice = "lnbc100...";
const result = await window.webln.sendPayment(invoice);

Demo

Copy link
Edit on GitHub
On this page