{"skills":[{"name":"Reconcile refunds after cancelling a trip","description":"Match promised refunds with cash received or travel credit issued and show which booking references still have money outstanding.","content":"# Reconcile refunds after cancelling a trip\n\nMatch promised refunds with cash received or travel credit issued and show which booking references still have money outstanding.\n\n## When to use this skill\n\n- Someone has cancelled several bookings and is waiting for a mix of cash refunds and vouchers.\n- A bank or card statement shows refunds that need matching to booking references.\n- A refund was paid in a different currency from the booking, or was reversed after it posted.\n\n## When not to use it\n\n- Deciding what refund or compensation is owed. That depends on the booking terms and, for flights, passenger rights law; the skill tracks what was agreed against what arrived.\n- Raising a dispute or chargeback with a card issuer. Use the issuer's own process with the ledger as evidence.\n\n## What you need\n\n- Booking references, currency, cancellation confirmations, promised cash and credit amounts and issue dates.\n- Card or bank refund entries, voucher confirmations and reversals with booking or transaction references. Redact payment details.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- For each booking, what did the provider confirm: the refund amount, its currency, and whether it is cash, travel credit or a voucher? A request with no confirmed amount is tracked separately.\n- Which card or account paid each booking, and in which currency does it post? Refunds usually return to the original payment method.\n- Do you have the statement lines, with dates and references, that you think are refunds?\n\n## Method\n\n1. For each booking reference, record what the provider agreed to return after any acknowledged cancellation fee, split into cash and credit, in the booking's currency. If no amount was confirmed, record the obligation as unknown, not as zero or a shortfall.\n2. Match each refund posting to a booking by reference, merchant, original payment method and currency. A pending notice and the later posted credit are one payment; count it once. Leave a credit unmatched if its reference does not match, even when the amount looks right.\n3. For a refund to a card in another currency, count the merchant's refund amount in the booking currency against the promise and keep the posted amount in the card currency from the same transaction separately. Never use the purchase exchange rate or add the two figures together.\n4. Keep cash and credit in separate ledgers. Count travel credit or a voucher only once it is issued and usable, not when it is promised. A reversed refund is no longer received.\n5. Calculate cash remaining and credit remaining against their own commitments, keeping signs so overpayments show. List unmatched postings for follow-up.\n6. Point out where a voucher stands in place of promised cash and which refunds are overdue on the provider's own stated timing. Do not state rights or deadlines the documents do not give; for a cancelled flight under UK rules, refer the person to the airline's seven-day refund duty.\n\n## Checks before you deliver\n\n- An email announcing a refund and the bank posting generally describe the same payment.\n- A voucher does not automatically discharge a promise to return cash.\n- Matching a bank credit to a booking because the amount is similar when the reference does not match.\n- Converting a foreign-currency refund at the original purchase rate instead of using the matched posted amount.\n- Counting a refund that was later reversed as received.\n\n## How to present the result\n\nLead with the total still outstanding, cash and credit separately, and the bookings it belongs to. Then give a table per booking: agreed cash and credit, received, remaining, and the matching transaction or voucher reference. List unmatched postings and unconfirmed amounts last, each with the question to send the provider.\n\n## Worked example\n\n**Request:** What is still outstanding?\n\n**Supplied material:**\n\n```text\nBooking H8 EUR: agreed EUR 180 cash and EUR 40 credit. Notice R1 EUR 100 cash pending. Posted R1 EUR 100 to card, H8. Credit V1 EUR 40 issued, H8. Posted U3 EUR 80, no booking or transaction match.\n```\n\n**Answer:** Booking H8 still has \u20ac80 cash outstanding. \u20ac100 has posted to the card and the \u20ac40 booking credit has been issued in full. The additional \u20ac80 posting U3 has no matching reference, so keep it separate until identified.\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 by_booking keyed by reference with cash_due, cash_received, cash_remaining, credit_due, credit_received and credit_remaining in the booking's stated currency. Use null for unconfirmed obligations and dependent remainders. Return unmatched as unmatched posted transaction IDs in input order. Use signed differences to preserve overpayments. For an explicit request about settled money in the card currency, add posted_cash keyed by booking and currency, using only matched bank entries net of reversals.\n\n## Sources\n\n- [Airbnb: how you'll get your refund](https:\/\/www.airbnb.com\/help\/article\/987): Airbnb's help article says refunds go back to the original payment method, follow any split payment, and may come back as booking credit under the host's cancellation policy. This is why the skill matches by payment method and keeps credit separate from cash.\n- [Barclaycard: where to find a posted refund](https:\/\/www.barclaycard.co.uk\/personal\/help\/spending-transactions\/refund-paper-statement): A card issuer shows that a refund appears on the statement as a credit marked CR, dated when the issuer received it, which can be on a different statement from the purchase. This is why the skill matches posted credits by date and reference.\n- [UK Regulation 261\/2004, article 8: reimbursement](https:\/\/www.legislation.gov.uk\/eur\/2004\/261\/article\/8): For flights covered by UK passenger rights law, reimbursement for a cancelled flight is due within seven days by the means in article 7(3): cash, bank transfer or cheque, or travel vouchers only with the passenger's signed agreement. This is why the skill never treats a voucher as settling a cash promise.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/reconcile-trip-refunds\n","scope":"contextual","trigger_keywords":["Reconcile refunds after cancelling a trip","reconcile-trip-refunds","reconcile trip refunds","Which refunds and vouchers am I still waiting for after cancelling our trip?","Which refunds and vouchers am I still waiting for after cancelling our trip","reconcile travel refunds","match these travel refunds","outstanding trip refunds"],"is_private":true,"is_active":true,"scripts":[{"name":"reconcile-trip-refunds-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-trip-refunds-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-trip-refunds\ndescription: \"Match promised trip refunds with bank or card credits and travel credit actually issued, booking by booking, and show the cash and credit still outstanding. Use when someone has cancelled flights, hotels or holidays and wants to know which refunds have arrived and which are still missing.\"\nlicense: CC-BY-4.0\nmetadata:\n  author: Raq.com\n  version: \"2026-11-22\"\n  homepage: https:\/\/skills.raq.com\/skills\/reconcile-trip-refunds\n---\n\n# Reconcile refunds after cancelling a trip\n\nMatch promised refunds with cash received or travel credit issued and show which booking references still have money outstanding.\n\n## When to use this skill\n\n- Someone has cancelled several bookings and is waiting for a mix of cash refunds and vouchers.\n- A bank or card statement shows refunds that need matching to booking references.\n- A refund was paid in a different currency from the booking, or was reversed after it posted.\n\n## When not to use it\n\n- Deciding what refund or compensation is owed. That depends on the booking terms and, for flights, passenger rights law; the skill tracks what was agreed against what arrived.\n- Raising a dispute or chargeback with a card issuer. Use the issuer's own process with the ledger as evidence.\n\n## What you need\n\n- Booking references, currency, cancellation confirmations, promised cash and credit amounts and issue dates.\n- Card or bank refund entries, voucher confirmations and reversals with booking or transaction references. Redact payment details.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- For each booking, what did the provider confirm: the refund amount, its currency, and whether it is cash, travel credit or a voucher? A request with no confirmed amount is tracked separately.\n- Which card or account paid each booking, and in which currency does it post? Refunds usually return to the original payment method.\n- Do you have the statement lines, with dates and references, that you think are refunds?\n\n## Method\n\n1. For each booking reference, record what the provider agreed to return after any acknowledged cancellation fee, split into cash and credit, in the booking's currency. If no amount was confirmed, record the obligation as unknown, not as zero or a shortfall.\n2. Match each refund posting to a booking by reference, merchant, original payment method and currency. A pending notice and the later posted credit are one payment; count it once. Leave a credit unmatched if its reference does not match, even when the amount looks right.\n3. For a refund to a card in another currency, count the merchant's refund amount in the booking currency against the promise and keep the posted amount in the card currency from the same transaction separately. Never use the purchase exchange rate or add the two figures together.\n4. Keep cash and credit in separate ledgers. Count travel credit or a voucher only once it is issued and usable, not when it is promised. A reversed refund is no longer received.\n5. Calculate cash remaining and credit remaining against their own commitments, keeping signs so overpayments show. List unmatched postings for follow-up.\n6. Point out where a voucher stands in place of promised cash and which refunds are overdue on the provider's own stated timing. Do not state rights or deadlines the documents do not give; for a cancelled flight under UK rules, refer the person to the airline's seven-day refund duty.\n\n## Checks before you deliver\n\n- An email announcing a refund and the bank posting generally describe the same payment.\n- A voucher does not automatically discharge a promise to return cash.\n- Matching a bank credit to a booking because the amount is similar when the reference does not match.\n- Converting a foreign-currency refund at the original purchase rate instead of using the matched posted amount.\n- Counting a refund that was later reversed as received.\n\n## How to present the result\n\nLead with the total still outstanding, cash and credit separately, and the bookings it belongs to. Then give a table per booking: agreed cash and credit, received, remaining, and the matching transaction or voucher reference. List unmatched postings and unconfirmed amounts last, each with the question to send the provider.\n\n## Worked example\n\n**Request:** What is still outstanding?\n\n**Supplied material:**\n\n```text\nBooking H8 EUR: agreed EUR 180 cash and EUR 40 credit. Notice R1 EUR 100 cash pending. Posted R1 EUR 100 to card, H8. Credit V1 EUR 40 issued, H8. Posted U3 EUR 80, no booking or transaction match.\n```\n\n**Answer:** Booking H8 still has \u20ac80 cash outstanding. \u20ac100 has posted to the card and the \u20ac40 booking credit has been issued in full. The additional \u20ac80 posting U3 has no matching reference, so keep it separate until identified.\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 by_booking keyed by reference with cash_due, cash_received, cash_remaining, credit_due, credit_received and credit_remaining in the booking's stated currency. Use null for unconfirmed obligations and dependent remainders. Return unmatched as unmatched posted transaction IDs in input order. Use signed differences to preserve overpayments. For an explicit request about settled money in the card currency, add posted_cash keyed by booking and currency, using only matched bank entries net of reversals.\n\n## Sources\n\n- [Airbnb: how you'll get your refund](https:\/\/www.airbnb.com\/help\/article\/987): Airbnb's help article says refunds go back to the original payment method, follow any split payment, and may come back as booking credit under the host's cancellation policy. This is why the skill matches by payment method and keeps credit separate from cash.\n- [Barclaycard: where to find a posted refund](https:\/\/www.barclaycard.co.uk\/personal\/help\/spending-transactions\/refund-paper-statement): A card issuer shows that a refund appears on the statement as a credit marked CR, dated when the issuer received it, which can be on a different statement from the purchase. This is why the skill matches posted credits by date and reference.\n- [UK Regulation 261\/2004, article 8: reimbursement](https:\/\/www.legislation.gov.uk\/eur\/2004\/261\/article\/8): For flights covered by UK passenger rights law, reimbursement for a cancelled flight is due within seven days by the means in article 7(3): cash, bank transfer or cheque, or travel vouchers only with the passenger's signed agreement. This is why the skill never treats a voucher as settling a cash promise.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/reconcile-trip-refunds\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-trip-refunds\nReferenced third-party materials retain their own terms.\n"},{"path":"examples\/worked-example.md","content":"# Two payment types for one booking\n\nWhat is still outstanding?\n\n## Supplied material\n\nBooking H8 EUR: agreed EUR 180 cash and EUR 40 credit. Notice R1 EUR 100 cash pending. Posted R1 EUR 100 to card, H8. Credit V1 EUR 40 issued, H8. Posted U3 EUR 80, no booking or transaction match.\n\n## Worked answer\n\nBooking H8 still has \u20ac80 cash outstanding. \u20ac100 has posted to the card and the \u20ac40 booking credit has been issued in full. The additional \u20ac80 posting U3 has no matching reference, so keep it separate until identified.\n\n## Reasoning\n\nR1 counts once, and there is insufficient evidence that U3 belongs to H8.\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":"What is still outstanding?\nReturn only the JSON specified in SKILL.md for this test.\n\nBooking H8 EUR: agreed EUR 180 cash and EUR 40 credit. Notice R1 EUR 100 cash pending. Posted R1 EUR 100 to card, H8. Credit V1 EUR 40 issued, H8. Posted U3 EUR 80, no booking or transaction match.\n"},{"path":"tests\/case-1\/expected.json","content":"{\n    \"by_booking\": {\n        \"H8\": {\n            \"cash_due\": 180,\n            \"cash_received\": 100,\n            \"cash_remaining\": 80,\n            \"credit_due\": 40,\n            \"credit_received\": 40,\n            \"credit_remaining\": 0\n        }\n    },\n    \"unmatched\": [\n        \"U3\"\n    ]\n}\n"},{"path":"tests\/case-1\/explanation.txt","content":"R1 counts once, and there is insufficient evidence that U3 belongs to H8.\n"},{"path":"tests\/case-2\/request.txt","content":"What remains for my cancelled train and hotel?\nReturn only the JSON specified in SKILL.md for this test.\n\nRef T3 GBP: cash refund \u00a355 confirmed, no credit. R2 posted \u00a355 to T3 then reversed in full. Ref H6 GBP: cash refund requested, amount unconfirmed; no credit or transactions.\n"},{"path":"tests\/case-2\/expected.json","content":"{\n    \"by_booking\": {\n        \"T3\": {\n            \"cash_due\": 55,\n            \"cash_received\": 0,\n            \"cash_remaining\": 55,\n            \"credit_due\": 0,\n            \"credit_received\": 0,\n            \"credit_remaining\": 0\n        },\n        \"H6\": {\n            \"cash_due\": null,\n            \"cash_received\": 0,\n            \"cash_remaining\": null,\n            \"credit_due\": 0,\n            \"credit_received\": 0,\n            \"credit_remaining\": 0\n        }\n    },\n    \"unmatched\": []\n}\n"},{"path":"tests\/case-2\/explanation.txt","content":"H6 is awaiting an amount. T3 has a confirmed obligation and a reversal.\n"},{"path":"tests\/case-3\/request.txt","content":"How much arrived on my card and how much of the euro promise is still open?\nReturn only the JSON specified in SKILL.md for this test.\n\nBooking H4 in EUR: promised EUR 300 cash total, EUR 50 voucher. Matched refund R4: merchant EUR 100, posted GBP 81.30. The voucher and remaining cash are promised for next week; nothing else has posted.\n"},{"path":"tests\/case-3\/expected.json","content":"{\n    \"by_booking\": {\n        \"H4\": {\n            \"cash_due\": 300,\n            \"cash_received\": 100,\n            \"cash_remaining\": 200,\n            \"credit_due\": 50,\n            \"credit_received\": 0,\n            \"credit_remaining\": 50\n        }\n    },\n    \"unmatched\": [],\n    \"posted_cash\": {\n        \"H4\": {\n            \"GBP\": 81.3\n        }\n    }\n}\n"},{"path":"tests\/case-3\/explanation.txt","content":"One payment is both \u20ac100 against the promise and \u00a381.30 actually received. The pending voucher is not cash.\n"}],"is_active":true,"is_approved":false}]}]}