Last updated 1 year ago
Request that the user sends a payment for an invoice. The application needs to provide a invoice. For an invoiceless payment, use .
Method
async function sendPayment(paymentRequest: string): SendPaymentResponse;
paymentRequest: string // the invoice you'd like the user to pay (lnbc...)
interface SendPaymentResponse { preimage: string; }
const invoice = "lnbc100..."; const result = await window.webln.sendPayment(invoice);