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
  1. Reference API
  2. Overview

lookup_invoice

Lookup data of a specific invoice

Previouspay_keysendNextlist_transactions

Last updated 1 year ago

Use case

The app requests to lookup a invoice from the wallet.

Request

{ 
    "method": "lookup_invoice",
    "params": {
        "payment_hash": "31afdf1..", // payment hash of the invoice, one of payment_hash or invoice is required
        "invoice": "lnbc50n1..." // invoice to lookup
            }
}

Response

{
    "result_type": "lookup_invoice",
    "result": {
        "type": "incoming", // "incoming" for invoices, "outgoing" for payments
        "invoice": "string", // encoded invoice, optional
        "description": "string", // invoice's description, optional
        "description_hash": "string", // invoice's description hash, optional
        "preimage": "string", // payment's preimage, optional if unpaid
        "payment_hash": "string", // Payment hash for the payment
        "amount": 123, // value in msats
        "fees_paid": 123, // value in msats
        "created_at": unixtimestamp, // invoice/payment creation time
        "expires_at": unixtimestamp, // invoice expiration time, optional if not applicable
        "settled_at": unixtimestamp, // invoice/payment settlement time, optional if unpaid
        "metadata": {} // generic metadata that can be used to add things like zap/boostagram details for a payer name/comment/etc.
    }
}
BOLT-11