payments-and-money
Skill1 starsChanged 15 days agoMITView on GitHub
Use when code handles money amounts, prices, currencies, payments, refunds, payouts, billing, wallets, ledgers, payment provider webhooks or card data
1 other project uses a version of this.
Adopted by
Most recently taken up by
- 05-deepak-patidar/claude-skillstheir own version, first seen Jul 7, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- 05-deepak-patidar/claude-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository36 other files it gives its agents.
- skills/writing-skills/references/agents.mdAGENTS.md
- templates/CLAUDE.mdCLAUDE.md
- backend-servicesSkill
- brainstormingSkill
- changing-legacy-codeSkill
- choosing-a-stackSkill
- ci-quality-gatesSkill
- database-changesSkill
- desktop-developmentSkill
- dispatching-parallel-agentsSkill
- docsSkill
- executing-plansSkill
- finishSkill
- git-workflowSkill
- implementSkill
- kit-initSkill
- mobile-developmentSkill
- new-taskSkill
- observabilitySkill
- onboarding-existing-codebaseSkill
- pos-systemsSkill
- publishing-documentsSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- security-reviewSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- ui-motionSkill
- updating-dependenciesSkill
- using-skillsSkill
- verification-before-completionSkill
- verifySkill
- web-frontendSkill
- writing-documentationSkill
- writing-plansSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Never use binary floating point for money: Use integer minor units (amountMinor: 1999) together with the currency, or a decimal type …
- Distinctive: line 22
Timeouts mean unknown, not failed: After a timeout or a dropped connection, query the provider for the status before retrying or telling …
- Distinctive: line 24
verify the signature against the raw body with a constant-time comparison.
- Distinctive: line 29
Atomicity: write the state change and the outgoing message together (outbox pattern), or use a DB transaction.
- Distinctive: line 30
A ledger for balances: use double-entry, append-only entries, and a balance derived from the entries.
- Distinctive: line 36
Minimize PCI DSS scope: Use hosted fields, redirects or the provider SDK's tokenization, so the raw PAN never touches your servers or logs.
- Distinctive: line 44
Test idempotency (the same key twice gives one charge), each state transition (and the invalid ones), webhook replay and out-of-order …
- Distinctive: line 45
Run integration tests against the provider's sandbox with its test cards and scenarios (declines, 3DS challenges, network errors).
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Payments and money
Payment bugs lose real money, cannot always be undone, and bring regulators. Every payment operation must be correct, idempotent, auditable and reconcilable. Prefer boring, proven designs and the provider's official SDK.
Amounts
- Never use binary floating point for money. Use integer minor units (
amountMinor: 1999) together with the currency, or a decimal type (BigDecimal,decimal,Decimal,NUMERIC). - The currency always travels with the amount. The minor-unit exponent comes from ISO 4217 (JPY 0, USD 2, KWD 3), never an assumed 2.
- Round once, at a defined point, with an explicit mode: half-up, or banker's rounding, as the business, tax or fiscal rule requires. When splitting (instalments, tax lines, split payments), allocate the remainder so the parts sum exactly to the total.
- In JSON and APIs, send amounts as integers in minor units or as decimal strings, never as floats.
- Tax, fee and FX rates are effective-dated configuration, not constants. Laws change them.
Operations
- Idempotency on every mutating call. The client generates an idempotency key per business operation. The server stores the key with the result and returns the same result on retry. Pass the key through to the provider.
- Explicit state machine per payment, for example
created → authorized → captured → refunded(partial|full), plusfailed,canceled,expired. Transitions are validated. States are never overwritten backwards. - Timeouts mean unknown, not failed. After a timeout or a dropped connection, query the provider for the status before retrying or telling the user it failed. Never charge twice.
- Webhooks:
- verify the signature against the raw body with a constant-time comparison;
- reject stale timestamps;
- dedupe by event id;
- tolerate out-of-order delivery (re-fetch the object when in doubt);
- acknowledge fast, process asynchronously.
- Atomicity: write the state change and the outgoing message together (outbox pattern), or use a DB transaction. No "charge, then crash before saving".
- A ledger for balances: use double-entry, append-only entries, and a balance derived from the entries. Corrections are new entries, never updates or deletes.
- Reconciliation: a scheduled job compares internal records with provider settlement reports and flags mismatches. Design for it from day one.
- An audit trail for who did what and when (refunds, manual adjustments, config changes). Audit rows are immutable.
Card data and compliance
- Minimize PCI DSS scope. Use hosted fields, redirects or the provider SDK's tokenization, so the raw PAN never touches your servers or logs.
- Never store the CVV/CVC, even encrypted. Never log a PAN (mask it to the first 6 and last 4 digits at most), a CVV, a full track, or a PIN. Scrub request logs, error reports and analytics.
- Strong customer authentication (3-D Secure / SCA) where the region requires it, with a fallback for challenge failure or timeout.
- Keys and secrets live in a secret manager, with separate keys per environment and restricted scopes. Test mode and live mode must never mix.
Testing
- Unit-test the amount math: rounding, allocation, currencies with exponents 0 and 3, negative and zero amounts, large values.
- Test idempotency (the same key twice gives one charge), each state transition (and the invalid ones), webhook replay and out-of-order delivery, and timeout → status query.
- Run integration tests against the provider's sandbox with its test cards and scenarios (declines, 3DS challenges, network errors).
Review points (add to code review)
- Floats near money.
- Missing idempotency key.
- Retry after a timeout without a status check.
- Unverified webhook.
- Card data in logs.
- Balance mutated in place.
- Missing currency.
- Tax rate hard-coded.
Destructive actions need human confirmation: real charges, refunds, payouts, live-key operations, migrations on payment tables. See pos-systems for in-store payments and security-review for the broader audit.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

