{"uid":"cap_JH9qyRlHqmvwduaznNA9X","slug":"lightning-invoice-decoder-b33083cb","name":"Lightning Invoice Decoder","description":"Decode a Lightning BOLT11 invoice: amount, description, payee node, payment hash, creation and expiry time, whether it has expired, route hints.","url":"https://diamond.btc-intel.workers.dev/api/x402/invoice_decode?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["invoice"],"properties":{"invoice":{"type":"string","maxLength":4000,"description":"A Lightning BOLT11 invoice (lnbc...)"}},"additionalProperties":false}},"additionalProperties":false}}},"responseSchema":{"type":"json","example":{"payee":"03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f","expired":false,"product":"decoded_invoice","amount_sat":1000,"expires_at":"2026-11-07T18:00:00Z","description":"..."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_YgrtFey5ufwdTqZCNj4c8","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Decodes a Lightning Network BOLT11 invoice string into human-readable fields: amount, description, payee node, payment hash, creation time, expiry time, and expiration status.","exampleAgentPrompt":"Can you decode this Lightning invoice for me and tell me the amount, who the payee is, and whether it's expired: lnbc1000n1pjk2v3xpp5...?","exampleUseCases":[{"title":"Verify invoice before paying","prompt":"Before I pay this Lightning invoice, can you decode it and tell me how many satoshis it's for, what the description says, and whether it's still valid: lnbc2500u1p3xyz...?"},{"title":"Extract payee node from invoice","prompt":"I need to know which Lightning node this invoice was issued by — can you decode it and give me the payee pubkey? The invoice is lnbc500n1pabcdef..."},{"title":"Check if invoice has expired","prompt":"Has this Lightning invoice expired yet? I got it a few days ago and I'm not sure if I can still pay it: lnbc1000u1pqrstuv..."}],"resultDescription":"A JSON object containing the decoded invoice fields: amount in satoshis, payee node public key, payment description, payment hash, creation time (UTC), expiry time (UTC), a boolean indicating whether the invoice has expired, and any route hints embedded in the invoice.","failureModes":["Invalid or malformed BOLT11 invoice string returns an error response","Invoice string exceeds 4000 character limit","Network timeout from the worker endpoint","Missing required 'invoice' query parameter results in a 400-style error","Checksum mismatch in the invoice string causes a parse failure"],"whenToPreferThis":"Use this endpoint when you need to programmatically inspect the contents of a Lightning BOLT11 invoice before paying it, verify its validity and expiry, or extract structured metadata (amount, payee, description) from an opaque invoice string. It is specifically designed for Lightning Network invoice decoding, making it more reliable than generic BOLT11 parsers for agents operating in Bitcoin/Lightning workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-20T00:03:31.231Z","isFirstParty":false,"canonicalSlug":"lightning-invoice-decoder-b33083cb"}