# Agent Data Tools – Lightning Invoice Decoder

> Agent Data Tools – Lightning Invoice Decoder is a paid API for AI agents from agent-data-tools.revmesh2074.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Decodes a BOLT11 Lightning Network invoice string and returns parsed payment details including amount, expiry, description, and network.

## Facts

- Endpoint: GET https://agent-data-tools.revmesh2074.workers.dev/ln-invoice?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-data-tools-lightning-invoice-decoder-de25b6f0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WDmY-kvv7fy61sVwoE-na

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent-data-tools-lightning-invoice-decoder-de25b6f0
```

Example prompt: Can you decode this Lightning invoice for me and tell me how much it's for and whether it's expired? lnbc2500u1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdq5xysxxatsyp3k7enxv4jsxqzpuaztrnwngzn3kdzygauqzpkklvs234tgk0lpk0lsmxvzzwv9zsk9gqjm63

## When to prefer this

Use this endpoint when you need to programmatically decode a BOLT11 Lightning Network invoice string without running a full Lightning node. It is ideal for agents that need to verify invoice amounts, check expiry, or extract payment hashes before authorizing or logging a payment. Pay-per-call with no API key required makes it suitable for lightweight, occasional invoice inspection tasks.

## Known failure modes

- Invalid or malformed BOLT11 invoice string returns an error
- Missing 'invoice' query parameter results in a validation error
- Testnet invoices (lntb...) may differ in network field behavior
- Very old invoices may parse correctly but show expired:true

## How this service works

Pay-per-call tools for AI agents: web page text extraction and summaries, screenshots, image generation, speech-to-text, image description, domain and email-auth intelligence, and live Base token and wallet lookups. No account or API key; pay per request in USDC on Base via x402.

## Output

Returns a JSON object with the decoded invoice fields: expired (boolean), network (e.g. 'bitcoin'), amountBtc, amountSats, createdAt (ISO timestamp), expiresAt (ISO timestamp), expirySeconds, description (payment memo), and paymentHash.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "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",
       "description": "BOLT11 invoice string starting with ln (lnbc... for mainnet)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "expired": true,
  "network": "bitcoin",
  "amountBtc": 0.0025,
  "createdAt": "2017-06-01T10:57:38.000Z",
  "expiresAt": "2017-06-01T10:58:38.000Z",
  "amountSats": 250000,
  "description": "1 cup coffee",
  "paymentHash": "0001020304050607080900010203040506070809000102030405060708090102",
  "expirySeconds": 60
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-data-tools-lightning-invoice-decoder-de25b6f0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data-tools.revmesh2074.workers.dev](https://www.zero.xyz/host/agent-data-tools.revmesh2074.workers.dev/llms.txt)
