Decode a Lightning invoice
Decode a BOLT11 Lightning Network invoice without paying it: network, amount in sats and BTC, description, payment hash, creation time, expiry time and whether it has already expired. Use to check what an invoice asks for before an agent pays it.
Inputs
| Name | Type | Description |
|---|---|---|
invoice (required) | string | BOLT11 invoice string starting with ln (lnbc... for mainnet) |
Request
Over HTTP, with a card key from /credits:
curl -H "Authorization: Bearer adt_…" "https://agent-data-tools.revmesh2074.workers.dev/ln-invoice?invoice=lnbc2500u1pvjluezsp5zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygspp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdq5xysxxatsyp3k7enxv4jsxqzpu9qrsgquk0rl77nj30yxdy8j9vdx85fkpmdla2087ne0xh8nhedh8w27kyke0lp53ut353s06fv3qfegext0eh0ymjpf39tuven09sam30g4vgpfna3rh"
Or one of your 25 free calls, no key:
curl "https://agent-data-tools.revmesh2074.workers.dev/ln-invoice?invoice=lnbc2500u1pvjluezsp5zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygspp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdq5xysxxatsyp3k7enxv4jsxqzpu9qrsgquk0rl77nj30yxdy8j9vdx85fkpmdla2087ne0xh8nhedh8w27kyke0lp53ut353s06fv3qfegext0eh0ymjpf39tuven09sam30g4vgpfna3rh&trial=1"
Without a key, the same URL answers 402 Payment Required with x402 and MPP terms, so an agent with a wallet pays per call in USDC (Base, Polygon, Arbitrum, Monad, World Chain or Tempo) and retries.
Example result
{
"network": "bitcoin",
"amountSats": 250000,
"amountBtc": 0.0025,
"description": "1 cup coffee",
"paymentHash": "0001020304050607080900010203040506070809000102030405060708090102",
"createdAt": "2017-06-01T10:57:38.000Z",
"expiresAt": "2017-06-01T10:58:38.000Z",
"expired": true,
"expirySeconds": 60
}
From an AI agent (MCP)
Add the MCP server to Claude, Cursor or any MCP client. This tool is ln_invoice, and the first 25 successful calls are free:
https://agent-data-tools.revmesh2074.workers.dev/mcp