← ClaudeAtlas

padosoft-payments-reconciliationlisted

Use this skill when money moves: a checkout or capture, a refund, a chargeback, a payout, a subscription renewal, a promotion or loyalty redemption, a usage or token bill. Also when the user reports that totals do not add up, that a customer was charged twice, that a refund exceeded the payment, that a payout cannot be tied to orders, that a promotion went over its cap, or that a payment request timed out and nobody knows whether it went through. It checks the state machine, the arithmetic that has to close, and the boundary between what the provider owns and what you own. Do not use it to integrate a specific provider's SDK, for PCI scope decisions, or for pricing and tax strategy.
padosoft/skills · ★ 1 · DevOps & Infrastructure · score 80
Install: claude install-skill padosoft/skills
# Payments and reconciliation A payment integration that parses correctly can still be **financially impossible**. These are the checks that make the difference, and they are almost all about a number that has to close or a boundary that has to stay closed. **The rule: money is a ledger of immutable events that must balance, not a status field that gets updated.** --- ## 1. The arithmetic has to close ```text captured − refunds − lost_chargebacks = net ``` Validating an order and a payment *independently* never detects drift between them. The settlement contract links every refund and every chargeback to the **exact** payment, distinguishes a resolved effect from an unresolved one, and proves the equation. And validate the state machine, not just an inequality: `refunded_amount ≤ amount` happily allows a "partially refunded" status with a zero refund, or a "not refunded" status with a positive one. Compare successful refund amounts against the cumulative amount observed on the payment. ## 2. The four joins that look done and are not | Looks like proof | Is not, because | |---|---| | A payout total equal to an order amount | equality is not inclusion. Persist the provider's source id at commit, then verify it appears in the payout's constituent ledger | | A payout linked to a balance transaction | that says which provider records funded it, not which of **your** orders did, nor when the bank settled | | An open or won dispute | exposure is not a loss. Only resolved-ag