# Payment & Ledger Code Review: stop money bugs

> Review payment, wallet and ledger code for double charges, float rounding, missing idempotency keys, unverified webhooks and broken double-entry, with a fix and a test for every issue.

Payment & Ledger Code Review: stop money bugs is a free 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: Free
- 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-26
- Security: scan passed (2026-11-26); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/payment-ledger-code-review-stop-money-bugs
- Tags: finance, code-review, security, fintech, stripe, ledger, payments

## About this skill

Money bugs rarely crash. They double-charge on retry, lose cents in rounding, let two requests spend the same balance, or mark an order paid from an unverified webhook. This skill makes your agent review payment code the way a fintech architect would.

### What it does
- **Scanner** for Python, JS/TS, C#, Java/Kotlin, Go, PHP, Ruby and SQL: money in floats, float rounding, hard-coded x100 minor units, payment API calls without idempotency keys, webhooks without signature checks, signatures compared with `==`, ledger rows updated or deleted.
- **Guided trace** of each money flow: retries and timeouts, concurrent debits, debits = credits, rounding and allocation, webhook ordering and replays.
- **10-section checklist**: money representation, double-entry, idempotency, concurrency, webhooks, refunds and disputes, FX, reconciliation, PCI scope, tests.
- **Report** with the scenario that triggers each bug, its impact, a code fix and the test to add.

### How it works
1. Scope the providers (Stripe, Adyen, PayPal, bank APIs) and flows.
2. Run the bundled scanner (standard-library Python, no network calls) and confirm each hit in context.
3. Trace the money flows by hand with the checklist.
4. Write `payment-review.md` with fixes, tests to add and checklist results.

Read-only: it never calls payment providers, moves money or changes data.

### What's included
`SKILL.md`, `scripts/money_lint.py`, a 10-section ledger review checklist, and bad and good code samples.

### Known limitations
- Pattern matching finds common mistakes, not logic errors; the manual trace is the core of the review.
- Engineering review only, not a PCI DSS assessment or accounting advice.

Built by the founder of Datazo InfoTech, which builds payment and banking platforms.

## Requires

- Python 3.9+

## 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 Code Review: stop money bugs skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### Does it call Stripe or move money?

No. It reads code only. It never calls payment providers, runs payment code or changes data.

### How is this different from a normal linter?

Linters do not know money. This checks money-specific failure modes (floats, rounding, idempotency, webhook verification, ledger immutability) and then traces each flow for retries, concurrency and double-entry balance.

### Which languages and providers does it support?

The scanner reads Python, JavaScript/TypeScript, C#, Java/Kotlin, Go, PHP, Ruby and SQL, and recognises Stripe, PayPal, Adyen, Razorpay, Square, Braintree, Mollie, Paddle, GoCardless and others. The checklist applies to any provider or bank API.

### What is included?

SKILL.md with the review workflow, scripts/money_lint.py (standard-library Python, Markdown and JSON output), a 10-section ledger review checklist, and bad and good code samples. MIT licence, free.

### Will it flag false positives?

Some. The agent opens each hit, confirms it in context and explains anything it drops.

---

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.
