async def handle_multi_pay_invoice(self, request_event: nEvent, params: dict) -> None:
        """
        Handler for multi_pay_invoice method.
        https://github.com/nostr-protocol/nips/blob/75f246ed987c23c99d77bfa6aeeb1afb669e23f7/47.md#multi_pay_invoice
        """
        invoices: List[dict] = params.get('invoices', [])
        for invoice_req in invoices:
            invoice: str = invoice_req.get('invoice', "")
            amount_msat: Optional[int] = invoice_req.get('amount')
            inv_id: Optional[str] = invoice_req.get('id')
            response = await self.pay_invoice(invoice, amount_msat, request_event.pubkey)
            if not inv_id:
                # if we have no id we need the payment hash
                try:
                    inv_id = Invoice.from_bech32(invoice).rhash
                except InvoiceError:
                    inv_id = "none"
            response['result_type'] = 'multi_pay_invoice'
            id_tag = [['d', inv_id]]
            await self.send_encrypted_response(
                request_event.pubkey,
                json.dumps(response),
                request_event.id,
                add_tags=id_tag
            )

        Handler for multi_pay_invoice method.
        https://github.com/nostr-protocol/nips/blob/75f246ed987c23c99d77bfa6aeeb1afb669e23f7/47.md#multi_pay_invoice
        
electrum/plugins/nwc/nwcserver.py