# Payment & Ledger Pro: scan, reconcile, test

> Find money bugs in code and data: payment-code scan, ledger vs provider reconciliation, double-entry checks, and a ready pytest suite for idempotency, rounding and webhooks.

Payment & Ledger Pro: scan, reconcile, test is a paid AI agent skill on Agensi by Rubbaite T. Hassain, in Finance & Accounting. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $19 (one-time purchase)
- Creator: [Rubbaite T. Hassain](https://www.agensi.io/creators/rubbaite)
- Category: [Finance & Accounting](https://www.agensi.io/skills/finance-accounting)
- Version: 1.0
- Last updated: 2026-11-27
- Security: scan passed (2026-11-27); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/payment-ledger-pro-scan-reconcile-test
- Tags: finance, code-review, security, python, stripe, payments, fintech, reconciliation

## About this skill

Money bugs rarely crash. They double-charge, lose cents or let a wallet go negative, and you find out from a customer or an auditor. This skill looks for them in your code, checks your data, and adds the tests that keep them out.

### What it does
- **Code scan**: money held in floats, float rounding, hard-coded x100, payment calls without idempotency keys, webhooks without signature checks, `==` signature compares, and UPDATE/DELETE on ledger rows.
- **Reconciliation**: `reconcile.py` matches your ledger against any provider CSV by transaction id. It reports missing, duplicate and mismatched amounts and currencies, with per-currency totals. It uses Decimal arithmetic and ISO 4217 decimals (JPY 0, KWD 3).
- **Ledger invariants**: `ledger_check.py` finds unbalanced entries, single-sided entries, negative postings, overdrawn wallets and mixed-currency entries.
- **Tests**: a pytest suite with five adapter functions for idempotent charges, splits that never lose a cent (with a property test), webhook signature rejection and redelivery, and balanced, single-currency entries. Plus a 14-row test plan.

Read-only: it never calls live payment providers or changes production data.

### Tested
The sample exports trigger every break type except a provider-side duplicate, and every ledger violation. The clean samples pass. All 11 tests pass against a reference implementation.

### Known limitations
- Pattern scanning finds common mistakes, not all logic errors. The manual trace with the checklist is part of the review.
- Reconciliation matches by transaction id. For batched payouts, use the provider's per-transaction export.
- An engineering review, not a PCI DSS assessment or accounting advice.

Licence: use in your organisation and in client work; do not resell.

## Requires

- Python 3.9+
- Optional: pytest
- Optional: hypothesis

Exports contain customer data: keep them local, use only the columns the check needs, and delete them afterwards.

## 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 & Ledger Pro: scan, reconcile, test 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 is it different from the free Payment & Ledger Code Review?

The free skill scans code. Pro adds ledger-vs-provider reconciliation, double-entry invariant checks, a ready pytest suite and a 14-row test plan.

### Which providers does reconciliation support?

Any CSV export. You map the id, amount and currency columns, so Stripe, Adyen, PayPal or a bank statement all work.

### Does it touch live payments or production data?

No. It works on exports and test environments and never calls live providers.

### How does it avoid rounding errors itself?

All amounts are parsed with Python's Decimal and converted to integer minor units using ISO 4217 exponents. No floats are used.

### Is this a PCI DSS assessment?

No. It is an engineering review of money correctness, not a compliance assessment or accounting advice.

### What do I get after purchase?

A ZIP with SKILL.md, the code scanner, reconcile.py, ledger_check.py, the pytest template and test plan, the review checklist and sample exports.

---

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.
