WebLN
v0.3.2
WebLN
v0.3.2
Overview
IntroductionGetting StartedUX Best Practices
Client API Reference
requestProviderwebln.getInfowebln.sendPaymentwebln.makeInvoicewebln.signMessagewebln.verifyMessageErrors
GitHub
Edit this page on GitHub
Edit

webln.sendPayment

Request that the user send a payment for an invoice. The application needs to provide a BOLT-11 invoice. Note that WebLN does not yet support invoiceless payments (e.g. Sphinx) so you will need to have a service that dynamically generates invoices per user.

Parameters

function sendPayment(paymentRequest: string): Promise<SendPaymentResponse>;

Response

interface SendPaymentResponse {
  preimage: string;
}