# payment history summary

> Report counts, totals, and a short sample without preimages.

payment history summary is a paid AI agent skill on Agensi by agent-bitcoin, in APIs & Backend. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9 (one-time purchase)
- Creator: [agent-bitcoin](https://www.agensi.io/creators/agent-bitcoin)
- Category: [APIs & Backend](https://www.agensi.io/skills/apis-backend)
- Version: 1.0
- Last updated: 2026-11-25
- Security: scan passed (2026-11-25); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/payment-history-summary
- Tags: api, bitcoin, lightning-network, lnd

## About this skill

Manual reconciliation of Lightning Network transactions is tedious and error-prone. This skill automates the retrieval and summarization of recent sent and received payments directly from an unlocked LND node.

### What it does
- **Connection verification** checks node connectivity and wallet lock status via the `agent-bitcoin` SDK.
- **Outbound payment analysis** retrieves the last ten sent payments and calculates total volume in satoshis.
- **Inbound invoice tracking** fetches the ten most recent invoices to report on settlement status and total paid amounts.
- **Privacy-first reporting** filters out sensitive data like preimages, full hashes, and BOLT11 strings while providing necessary audit trails.

### How it works
1. **Node Check**: The skill calls `get_info` to ensure the LND node is reachable and the wallet is unlocked.
2. **Data Extraction**: It executes `listpayments` and `listinvoices` commands via the local container.
3. **Aggregation**: The skill calculates sums of `value_sat` and `amt_paid_sat` from the raw JSON output.
4. **Summary Generation**: It presents a formatted report including counts, totals, and a truncated transaction sample.

### Frameworks & tools
This skill requires the `agent-bitcoin` SDK, `lncli`, and access to a running LND node within a Docker container named `agent-payment-decision-lnd`.

### Why this beats prompting it yourself
Writing manual scripts to parse raw Lightning JSON is slow and risky. This skill handles the specific command flags, calculates totals automatically, and strictly enforces privacy rules to prevent leaking payment secrets in logs.

### Use cases
- Reviewing recent activity before authorizing new outbound payments.
- Verifying recent invoice settlements for service delivery.
- Quick daily balance and volume auditing for a node operator.

### Known limitations
Requires an unlocked LND node. Only summarizes the 10 most recent transactions. Defaulted to regtest unless mainnet access is explicitly granted via environment variables.

## Requires

- Python 3.10+
- agent-bitcoin package
- unlocked LND node

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the payment history summary skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill simplify Lightning Network auditing?

This skill automates the retrieval and aggregation of your 10 most recent inbound and outbound Lightning transactions, providing total volume sums and settlement statuses in a clean, human-readable format without requiring manual JSON parsing.

### What are the specific technical requirements to run this skill?

The skill requires the `agent-bitcoin` SDK, `lncli`, and access to an LND node running in a Docker container named `agent-payment-decision-lnd`. The node must be fully unlocked for the skill to retrieve data.

### Does this skill expose sensitive information like payment preimages?

Privacy is a core feature; the skill is programmed to automatically strip sensitive data such as preimages, payment hashes, and full BOLT11 strings from its reports, ensuring your payment secrets aren't exposed in logs.

### Can I use this skill on Mainnet, or is it restricted to Testnet/Regtest?

By default, the skill is configured for `regtest` to ensure a safe testing environment, but it can be toggled to `mainnet` via environment variables once you are ready for production use.

### Is there a limit to how many historical payments this skill can summarize?

The skill focuses on the 10 most recent transactions for speed and brevity. For deep forensic accounting of an entire node's history, we recommend using a dedicated blockchain indexing tool.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
