# How do I reconcile an AI agent's spend against the bank feed at month end?

**Short answer:** Treat it as a two-sided match. On one side are the agent's spend records: one signed authorize_spend receipt per purchase, with amount, currency, merchant domain, category, time and your own reference. On the other side are the bank or card feed lines for the month. Match by your reference first, then by amount, currency, merchant and a date window, and label every line on both sides. Bank lines with no allow receipt are the ones that matter most, because that money left outside the agent's guardrails. So is any bank line that matches a deny receipt. Receipts with no bank line are usually timing (captured next month), a cancelled order or another payment rail. Amount differences usually come from tips, partial or over-captures, fees or currency conversion. Verify every receipt free with verify_spend_authorization, hash the finished reconciliation file, and record that hash with record_ai_run so the month's result can't be quietly rewritten later. This page is about month-end bank matching. Reconciling a single payment before replaying a run, and exporting a period pack for an auditor, are covered on separate pages.

## Checklist
1. Make authorize_spend the step before every agent payment and set reference to something that will show up on the payment side too, such as your order number, invoice number or the payment provider's id (up to 120 characters). Keep every spa_ receipt id the agent gets back, allows and denies.
2. At month end, pull the agent's side: every receipt id for the month, each fetched with GET /v1/spend/authorizations/{id} (amount_minor, currency, merchant_domain, category, reference, decision, issued_at) and checked with verify_spend_authorization.
3. Pull the bank side for the same account or card: the bank feed lines (QuickBooks Online For review, Xero statement lines) or the card issuer's transactions. Note that QuickBooks Online doesn't download pending transactions, so late-month card purchases may only appear in the next month's feed.
4. Match in passes. First by reference or provider id. Then by exact amount and currency within a short date window and a merchant descriptor that fits the merchant_domain. Then one-to-many, for orders split across several charges or several purchases settled as one line.
5. Label every line: matched; bank line with no receipt; bank line matching a deny receipt; receipt with no bank line; amount differs. Never force a match to clear a line.
6. Escalate bank lines with no allow receipt and bank lines matching a deny receipt the same day. Pause the agent's spend, check which key or card was used, and decide whether to revoke.
7. Carry receipts with no bank line forward as timing items with a review date, and clear them against next month's feed. Card captures normally land within 24 hours, but hotels, airlines and car rental companies can capture up to 31 days after authorization.
8. Export the finished reconciliation (one row per line with its label and both ids), compute its SHA-256, record it with record_ai_run, and give the file and the receipt id to your accountant. Fix later findings with a new reconciliation version, not an edit to the old file.

## Why does AI agent spend need a two-sided match against the bank feed?
- Matching bank lines only to bookkeeping entries tells you the books agree with the bank. It doesn't tell you whether each payment was one the agent was allowed to make. A spend record per purchase, made before the payment, is what lets you answer that.
- The two directions find different problems. A bank line with no receipt means money left without passing the spend check: a key used outside the agent, a card used directly, or a merchant charging on its own. A receipt with no bank line means the check passed but no money moved yet, or it moved somewhere you didn't look.
- QuickBooks Online suggests matches only for the same amount within a set date range (90 days before to 20 days after the transaction date). It won't suggest a match when fees or discounts change the total or several payments were deposited together, so agent spend with tips, FX or batching needs your own rules, not just the feed's suggestions.

## How do I match AI agent spend receipts to bank lines when amounts and dates differ?
- Reference first: if the agent put your order number or the provider's payment id in reference, the match is exact. Put the same value in the payment's metadata or memo so it reaches the feed where the rail allows it.
- Amounts can legitimately differ. Stripe Issuing documents partial capture, over capture (for example tips), multi capture and force capture, and refunds that it can only link to the original authorization on a best-effort basis. Foreign-currency purchases settle at a converted amount. Record the receipt amount and the bank amount side by side, with the reason for any difference.
- Dates differ too. The receipt time is when the agent asked; the bank date is when the charge posted or settled. Use a window of a few days for most merchants, longer for travel, and treat anything outside it as a separate finding.

## How do I give my accountant a signed month-end reconciliation of AI agent spend?
- verify_spend_authorization is free and needs no key: send the receipt id and it answers whether the receipt is genuine, on record and an allow. Run it on every receipt in the month, so a pasted or edited receipt doesn't clear a bank line.
- record_ai_run signs a record of the SHA-256 of your reconciliation file, plus summary counts in params, onto Rightshold's append-only ledger. Later, anyone with the file can recompute the hash and check it with verify_ai_run. That proves the file is the one you recorded at that time, not that every label in it is right.
- Keep the receipts, the bank export and the signed reconciliation together for the month. A period-locked signed spend pack can then include the reconciliation alongside the spend receipts and approvals.

## Ask Rightshold (free, no key)
Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code (one-click setup: https://www.rightshold.com/start?ref=seo), then ask: "Record a signed receipt for my October agent-spend reconciliation: the SHA-256 of the reconciliation CSV and the counts of matched lines, bank lines with no receipt, receipts with no bank line and amount differences."

```json
{
  "tool": "record_ai_run",
  "arguments": {
    "model": "<agent or script that ran the reconciliation>",
    "provider": "<runtime or framework>",
    "output_sha256": "<sha256 of the reconciliation CSV>",
    "params": {
      "period": "2026-10",
      "credential_id": "crd_YOUR_AGENT_CREDENTIAL",
      "matched": 41,
      "bank_no_receipt": 1,
      "receipt_no_bank": 2,
      "amount_differs": 3,
      "deny_with_bank_line": 0
    },
    "ran_at": "2026-11-02T14:00:00Z"
  }
}
```
- Needs an API key. Only hashes and the fields you send are recorded; the receipt is Ed25519-signed and written to Rightshold's append-only ledger. verify_ai_run is free and checks it.
- verify_spend_authorization is free and needs no key: send {id} for each spa_ receipt in the month before you use it to clear a bank line.
- authorize_spend (owner key, trust toolset at /mcp?toolset=trust) is the step before every payment. Set reference to the order or provider id you'll see on the bank side.
- If a bank line has no allow receipt, set_spend_policy with a deny-all version pauses the agent's spend while you look, and revoke_agent cuts the credential permanently.

_Rightshold doesn't connect to your bank, card issuer, QuickBooks or Xero, and it never holds or moves money. It signs spend decisions and the reconciliation hash you send. Pulling the bank feed, matching lines and deciding what each difference means are steps you and your accountant run. Not accounting, tax, audit or legal advice._

## Sources
- [QuickBooks Online: Match your bank and credit card transactions (90 days before to 20 days after; when no match is suggested)](https://quickbooks.intuit.com/learn-support/en-us/help-article/bank-feeds/match-online-bank-transactions-quickbooks-online/L6qyw0PvP_US_en_US)
- [QuickBooks Online: Categorize online bank transactions (pending transactions aren't downloaded)](https://quickbooks.intuit.com/learn-support/en-us/help-article/banking/categorize-match-online-bank-transactions-online/L1bTafTz3_US_en_US)
- [Xero Central: About bank feeds](https://central.xero.com/0/article/Bank-feeds)
- [Stripe Docs: Issuing transactions (capture timing, partial, over and multi capture, refunds)](https://docs.stripe.com/issuing/purchases/transactions)
- [Agent spending policies on Rightshold](https://www.rightshold.com/agent-spending-policies)
- [Verified AI Runs on Rightshold](https://www.rightshold.com/verified-ai-runs)

## Related
- [How to bind an agent payment receipt to its trigger, policy and idempotency key, and reconcile before replay](https://www.rightshold.com/answers/how-to-bind-an-agent-payment-receipt-to-its-trigger-policy-and-idempotency-key-and-reconcile-before-replay)
- [How to export a period-locked signed agent spend pack for an external auditor](https://www.rightshold.com/answers/how-to-export-a-period-locked-signed-agent-spend-pack-for-an-external-auditor)
- [How can a CPA audit what an AI agent did in the books?](https://www.rightshold.com/answers/how-can-a-cpa-audit-what-an-ai-agent-did-in-the-books)
- [How to temporarily pause an AI agent's spend without revoking its credential](https://www.rightshold.com/answers/how-to-temporarily-pause-an-ai-agents-spend-without-revoking-its-credential)

_Not legal advice. Updated 2026-11-07. JSON: https://www.rightshold.com/answers/how-to-reconcile-an-ai-agents-spend-against-the-bank-feed-at-month-end.json_