Nostr Wallet Connect Docs
  • Introduction
    • Welcome to NWC
    • Introduction to NWC
  • What to Build
  • FAQ
  • Bitcoin apps and websites
    • Benefits and Features
    • Getting Started
    • Code Examples
    • Connecting To The Wallet
      • Traditional Connection Flow
      • 1-Click Wallet Connections
    • SDKs and Tools
    • Best Practices
  • Bitcoin Lightning wallets
    • Benefits and Features
    • Getting Started
    • Code Examples
    • NWC Relay
    • References & SDKs
    • Best Practices
  • Reference API
    • Overview
      • get_info
      • get_balance
      • make_invoice
      • pay_invoice
      • multi_pay_invoice
      • pay_keysend
      • lookup_invoice
      • list_transactions
    • Error Codes
  • Contribute
    • Specification
    • Design Assets
Powered by GitBook
On this page
  • Use case
  • Request
  • Response
  • Errors
  1. Reference API
  2. Overview

multi_pay_invoice

Request payment of multiple invoices.

Previouspay_invoiceNextpay_keysend

Last updated 1 year ago

Use case

The app requests a payment of multiple invoices from the wallet.

Request

{
    "method": "multi_pay_invoice",
    "params": {
        "invoices": [
          {"invoice": lnbc1...", "amount": 123}, // bolt11 invoice and amount in msats, amount is optional
          {"invoice": lnbc50n1..."},
        ],
    }
}

Response

For every invoice in the request, a separate response event is sent. To differentiate between the responses, each response event contains an payment_hash tag with the payment hash of the invoice it is responding to.

{
    "result_type": "multi_pay_invoice",
    "result": {
        "preimage": "0123456789abcdef..." // preimage of the payment
    }
}

Errors

  • PAYMENT_FAILED: The payment failed. This may be due to a timeout, exhausting all routes, insufficient capacity or similar.

BOLT-11