Request that the user sends a payment for an invoice. The application needs to provide a BOLT-11 invoice. The payment will only be initiated and will not wait for a preimage to be returned. This is useful when paying HOLD invoices. There is no guarantee that the payment will be successfully sent to the receiver. It's up to the receiver to check whether or not the invoice has been paid.

This API may not be available on all providers.


async function
    sendPaymentAsync(paymentRequest: string): SendPaymentAsyncResponse;


paymentRequest: string // the invoice you'd like the user to pay (lnbc...)


interface SendPaymentAsyncResponse {} // no preimage returned!


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


Last updated