{"skills":[{"name":"Reconcile a payment processor payout","description":"Explain a single automatic settlement using its actual charges, refunds, fees and adjustments.","content":"# Reconcile a payment processor payout\n\nExplain a single automatic settlement using its actual charges, refunds, fees and adjustments.\n\n## When to use this skill\n\n- A Stripe, PayPal, Square or similar payout reached the bank and does not match the day's sales.\n- The bookkeeper needs to post the gross sales, fees, refunds and reserves behind one net deposit.\n- A payout looks short and someone wants to know whether a refund, dispute or reserve explains it.\n\n## When not to use it\n\n- Reconciling the whole bank statement. Use the bank reconciliation exceptions skill once each payout is explained.\n- Responding to a chargeback or dispute. Use the processor's dispute process and its evidence rules.\n- Deciding the VAT or sales tax treatment of processor fees or marketplace sales. Check the tax authority's guidance or ask an accountant.\n\n## What you need\n\n- One payout ID, payout type, settlement currency and the matching bank deposit\n- Itemised settlement report with payout membership and signed balance impacts\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Is the payout automatic, manual or instant? Only automatic payouts come with an itemised list of the transactions they settle.\n- Do you have the itemised payout export for that payout ID, not just a balance or activity summary?\n- Which bank credit is it, on what date, and in which currency did it arrive?\n- Which processor is it? Column names and sign conventions differ between providers.\n\n## Method\n\n1. Identify the payout: ID, type, settlement currency, amount and expected arrival date, and the bank credit it should match. For a manual or instant payout without an itemised allocation, report that it cannot be itemised and reconcile the processor balance instead.\n2. Select balance transactions by payout ID. Creation date, available date or invoice date cannot establish membership, because refunds and fees can settle in a different payout from the original sale.\n3. Treat each row by its signed settlement impact and reporting category: charge, refund, dispute, fee, reserve held or released, or other adjustment. With a positive fee deduction, net equals gross less fee. If you use the report's net column, use it once. A reserve release adds cash without being a new sale.\n4. Check each row's calculated net against the report's net where one is given, then total by category and for the payout.\n5. Compare the expected net with the bank credit. Isolate bank-side differences such as currency conversion, bank charges or a failed and retried payout.\n6. Report any unexplained difference without inventing a balancing line. Keep transactions from other payout IDs out, even when their dates match.\n7. For the books, show gross charges, fees, refunds, disputes and reserve movements separately rather than posting only the net deposit as sales.\n\n## Checks before you deliver\n\n- Subtracting fees from a report's net column charges them twice.\n- Refunds can settle in a later payout than the original sale. An invoice date cannot tell you which transfer includes one.\n- Treating a reserve release as new sales overstates revenue for the period.\n- Deducting tax on fees a second time. In Stripe's itemised report the withheld tax is already included in the fee column.\n- Selecting rows by date range instead of payout ID pulls in transactions that belong to neighbouring payouts.\n\n## How to present the result\n\nLead with whether the payout reconciles to the bank credit and the amount of any difference. Then give a table by category (charges, refunds, fees, disputes, reserves, other) with count, gross, fee and net, totalling to the expected deposit. List rows left out because they belong to other payouts. For a manual payout, say why it cannot be itemised and what to reconcile instead.\n\n## Worked example\n\n**Request:** Does bank deposit PA1 reconcile?\n\n**Supplied material:**\n\n```text\nAutomatic PA1, GBP, bank credit 161.80. Rows: ID \/ payout \/ gross \/ fee deduction. B1 PA1 200 6; B2 PA1 -30 0; B3 PA1 0 2.20; B4 PA2 50 1.\n```\n\n**Answer:** PA1 reconciles to the \u00a3161.80 bank credit. B1 provides \u00a3194 net, B2 is a \u00a330 refund and B3 deducts \u00a32.20, leaving no unexplained difference. B4\u2019s \u00a349 net belongs to PA2.\n\n## Structured output for tests\n\nFor an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.\n\nReturn status as compared or no_allocation, included as lexicographically sorted balance row IDs, expected_deposit and bank_difference (bank less expected) as numbers in the settlement currency. Use null for both numbers if there is no allocation.\n\n## Sources\n\n- [Stripe \u00b7 Payout reconciliation report](https:\/\/docs.stripe.com\/reports\/payout-reconciliation): Stripe's itemised report lists every charge, refund, dispute, fee and other balance transaction in an automatic payout. It is not available for manual or instant payouts, groups payouts by estimated arrival date rather than the date the bank posts them, and includes withheld tax within the fee column.\n- [Stripe \u00b7 Reporting categories](https:\/\/docs.stripe.com\/reports\/reporting-categories): Stripe's reporting categories separate charges, refunds, fees and payout reversals, and give reserve movements their own categories such as risk_reserved_funds, so reserve holds and releases are reported apart from sales.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/reconcile-processor-payout\n","scope":"contextual","trigger_keywords":["Reconcile a payment processor payout","reconcile-processor-payout","reconcile processor payout","Why doesn\u2019t this Stripe payout match the day\u2019s sales?","Why doesn\u2019t this Stripe payout match the day\u2019s sales","reconcile this payout","reconcile a processor payout","match this payout to sales"],"is_private":true,"is_active":true,"scripts":[{"name":"reconcile-processor-payout-check","description":"Compare a saved JSON answer with a published test. Pass tests\/case-1\/expected.json (or another case) and the path to your answer.","language":"python","filename":"reconcile-processor-payout-check.py","content":"from pathlib import Path\nimport runpy\n\nrunpy.run_path(str(Path(__file__).parent \/ 'tests' \/ 'check.py'), run_name='__main__')\n","supporting_files":[{"path":"SKILL.md","content":"---\nname: reconcile-processor-payout\ndescription: \"Reconcile one Stripe or other card processor payout to the bank deposit from the payout's itemised transactions: charges, refunds, fees, disputes and reserve movements. Use when a payout or settlement in the bank does not match sales, or before posting processor fees.\"\nlicense: CC-BY-4.0\nmetadata:\n  author: Raq.com\n  version: \"2026-11-22\"\n  homepage: https:\/\/skills.raq.com\/skills\/reconcile-processor-payout\n---\n\n# Reconcile a payment processor payout\n\nExplain a single automatic settlement using its actual charges, refunds, fees and adjustments.\n\n## When to use this skill\n\n- A Stripe, PayPal, Square or similar payout reached the bank and does not match the day's sales.\n- The bookkeeper needs to post the gross sales, fees, refunds and reserves behind one net deposit.\n- A payout looks short and someone wants to know whether a refund, dispute or reserve explains it.\n\n## When not to use it\n\n- Reconciling the whole bank statement. Use the bank reconciliation exceptions skill once each payout is explained.\n- Responding to a chargeback or dispute. Use the processor's dispute process and its evidence rules.\n- Deciding the VAT or sales tax treatment of processor fees or marketplace sales. Check the tax authority's guidance or ask an accountant.\n\n## What you need\n\n- One payout ID, payout type, settlement currency and the matching bank deposit\n- Itemised settlement report with payout membership and signed balance impacts\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Is the payout automatic, manual or instant? Only automatic payouts come with an itemised list of the transactions they settle.\n- Do you have the itemised payout export for that payout ID, not just a balance or activity summary?\n- Which bank credit is it, on what date, and in which currency did it arrive?\n- Which processor is it? Column names and sign conventions differ between providers.\n\n## Method\n\n1. Identify the payout: ID, type, settlement currency, amount and expected arrival date, and the bank credit it should match. For a manual or instant payout without an itemised allocation, report that it cannot be itemised and reconcile the processor balance instead.\n2. Select balance transactions by payout ID. Creation date, available date or invoice date cannot establish membership, because refunds and fees can settle in a different payout from the original sale.\n3. Treat each row by its signed settlement impact and reporting category: charge, refund, dispute, fee, reserve held or released, or other adjustment. With a positive fee deduction, net equals gross less fee. If you use the report's net column, use it once. A reserve release adds cash without being a new sale.\n4. Check each row's calculated net against the report's net where one is given, then total by category and for the payout.\n5. Compare the expected net with the bank credit. Isolate bank-side differences such as currency conversion, bank charges or a failed and retried payout.\n6. Report any unexplained difference without inventing a balancing line. Keep transactions from other payout IDs out, even when their dates match.\n7. For the books, show gross charges, fees, refunds, disputes and reserve movements separately rather than posting only the net deposit as sales.\n\n## Checks before you deliver\n\n- Subtracting fees from a report's net column charges them twice.\n- Refunds can settle in a later payout than the original sale. An invoice date cannot tell you which transfer includes one.\n- Treating a reserve release as new sales overstates revenue for the period.\n- Deducting tax on fees a second time. In Stripe's itemised report the withheld tax is already included in the fee column.\n- Selecting rows by date range instead of payout ID pulls in transactions that belong to neighbouring payouts.\n\n## How to present the result\n\nLead with whether the payout reconciles to the bank credit and the amount of any difference. Then give a table by category (charges, refunds, fees, disputes, reserves, other) with count, gross, fee and net, totalling to the expected deposit. List rows left out because they belong to other payouts. For a manual payout, say why it cannot be itemised and what to reconcile instead.\n\n## Worked example\n\n**Request:** Does bank deposit PA1 reconcile?\n\n**Supplied material:**\n\n```text\nAutomatic PA1, GBP, bank credit 161.80. Rows: ID \/ payout \/ gross \/ fee deduction. B1 PA1 200 6; B2 PA1 -30 0; B3 PA1 0 2.20; B4 PA2 50 1.\n```\n\n**Answer:** PA1 reconciles to the \u00a3161.80 bank credit. B1 provides \u00a3194 net, B2 is a \u00a330 refund and B3 deducts \u00a32.20, leaving no unexplained difference. B4\u2019s \u00a349 net belongs to PA2.\n\n## Structured output for tests\n\nFor an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.\n\nReturn status as compared or no_allocation, included as lexicographically sorted balance row IDs, expected_deposit and bank_difference (bank less expected) as numbers in the settlement currency. Use null for both numbers if there is no allocation.\n\n## Sources\n\n- [Stripe \u00b7 Payout reconciliation report](https:\/\/docs.stripe.com\/reports\/payout-reconciliation): Stripe's itemised report lists every charge, refund, dispute, fee and other balance transaction in an automatic payout. It is not available for manual or instant payouts, groups payouts by estimated arrival date rather than the date the bank posts them, and includes withheld tax within the fee column.\n- [Stripe \u00b7 Reporting categories](https:\/\/docs.stripe.com\/reports\/reporting-categories): Stripe's reporting categories separate charges, refunds, fees and payout reversals, and give reserve movements their own categories such as risk_reserved_funds, so reserve holds and releases are reported apart from sales.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/reconcile-processor-payout\n"},{"path":"LICENSE.txt","content":"Original Raq.com instructions and synthetic examples: CC BY 4.0.\nhttps:\/\/creativecommons.org\/licenses\/by\/4.0\/\nAttribution: Raq.com, https:\/\/skills.raq.com\/skills\/reconcile-processor-payout\nReferenced third-party materials retain their own terms.\n"},{"path":"examples\/worked-example.md","content":"# Mixed settlement\n\nDoes bank deposit PA1 reconcile?\n\n## Supplied material\n\nAutomatic PA1, GBP, bank credit 161.80. Rows: ID \/ payout \/ gross \/ fee deduction. B1 PA1 200 6; B2 PA1 -30 0; B3 PA1 0 2.20; B4 PA2 50 1.\n\n## Worked answer\n\nPA1 reconciles to the \u00a3161.80 bank credit. B1 provides \u00a3194 net, B2 is a \u00a330 refund and B3 deducts \u00a32.20, leaving no unexplained difference. B4\u2019s \u00a349 net belongs to PA2.\n\n## Reasoning\n\nThe unrelated \u00a349 net belongs to another payout.\n"},{"path":"tests\/check.py","content":"\"\"\"Check a saved agent answer locally with Python 3 (standard library only).\"\"\"\nimport json\nimport math\nimport sys\nfrom pathlib import Path\n\n\ndef compare(expected, actual, path=\"$\", accepted=None):\n    if isinstance(expected, bool) or isinstance(actual, bool):\n        if expected is not actual:\n            yield path\n    elif isinstance(expected, (int, float)) and isinstance(actual, (int, float)):\n        if not math.isclose(expected, actual, rel_tol=0, abs_tol=1e-8):\n            yield path\n    elif isinstance(expected, dict) and isinstance(actual, dict):\n        for key in sorted(set(expected) | set(actual)):\n            if key not in expected or key not in actual:\n                yield f\"{path}.{key}\"\n            elif not any(\n                not list(compare(option, actual[key]))\n                for option in (accepted or {}).get(key, [])\n            ):\n                yield from compare(expected[key], actual[key], f\"{path}.{key}\")\n    elif isinstance(expected, list) and isinstance(actual, list):\n        if len(expected) != len(actual):\n            yield f\"{path} (length)\"\n        for i, (left, right) in enumerate(zip(expected, actual)):\n            yield from compare(left, right, f\"{path}[{i}]\")\n    elif type(expected) != type(actual) or expected != actual:\n        yield path\n\n\ndef main():\n    if len(sys.argv) != 3:\n        raise SystemExit(\"Usage: python3 check.py expected.json answer.json\")\n    try:\n        expected, actual = [json.loads(Path(p).read_text(encoding=\"utf-8\")) for p in sys.argv[1:]]\n        alternatives = Path(sys.argv[1]).with_name(\"accepted.json\")\n        accepted = json.loads(alternatives.read_text(encoding=\"utf-8\")) if alternatives.is_file() else {}\n    except (ValueError, OSError) as error:\n        raise SystemExit(str(error))\n    differences = list(compare(expected, actual, accepted=accepted))\n    if differences:\n        raise SystemExit(\"Different fields: \" + \", \".join(differences))\n    print(\"Pass\")\n\n\nif __name__ == \"__main__\":\n    main()\n"},{"path":"tests\/README.md","content":"Give your agent SKILL.md and one request.txt in a fresh session. Keep the expected answer aside. Save the reply as answer.json, then run this from the tests folder:\n\n    python3 check.py case-1\/expected.json answer.json\n\nEach case also has an explanation. Where accepted.json exists, the checker accepts the alternatives listed there.\n"},{"path":"tests\/case-1\/request.txt","content":"Does bank deposit PA1 reconcile?\nReturn only the JSON specified in SKILL.md for this test.\n\nAutomatic PA1, GBP, bank credit 161.80. Rows: ID \/ payout \/ gross \/ fee deduction. B1 PA1 200 6; B2 PA1 -30 0; B3 PA1 0 2.20; B4 PA2 50 1.\n"},{"path":"tests\/case-1\/expected.json","content":"{\n    \"status\": \"compared\",\n    \"included\": [\n        \"B1\",\n        \"B2\",\n        \"B3\"\n    ],\n    \"expected_deposit\": 161.8,\n    \"bank_difference\": 0\n}\n"},{"path":"tests\/case-1\/explanation.txt","content":"The unrelated \u00a349 net belongs to another payout.\n"},{"path":"tests\/case-2\/request.txt","content":"Identify which customer sales funded this deposit.\nReturn only the JSON specified in SKILL.md for this test.\n\nManual payout MAN8 \u20ac500. Bank credit \u20ac500. Daily account movements include sales \u20ac600, fees \u20ac18 and refunds \u20ac82, but no payout allocation is supplied.\n"},{"path":"tests\/case-2\/expected.json","content":"{\n    \"status\": \"no_allocation\",\n    \"included\": [],\n    \"expected_deposit\": null,\n    \"bank_difference\": null\n}\n"},{"path":"tests\/case-2\/explanation.txt","content":"A coincidental daily total cannot identify the items in a manual transfer.\n"},{"path":"tests\/case-3\/request.txt","content":"Explain this automatic GBP payout P excluding other periods.\nReturn only the JSON specified in SKILL.md for this test.\n\nBank P 525. The P itemisation shows CH sale +500 gross, F separate fee \u221215 net, RF refund \u221260 net, RES reserve previously withheld +100 net. No other rows or fees.\n"},{"path":"tests\/case-3\/expected.json","content":"{\n    \"status\": \"compared\",\n    \"included\": [\n        \"CH\",\n        \"F\",\n        \"RES\",\n        \"RF\"\n    ],\n    \"expected_deposit\": 525,\n    \"bank_difference\": 0\n}\n"},{"path":"tests\/case-3\/explanation.txt","content":"\u00a3500 less \u00a315 and \u00a360 plus a \u00a3100 reserve release matches \u00a3525. Only \u00a3500 is a gross sale.\n"}],"is_active":true,"is_approved":false}]}]}