Money in cents, charges only in prd — no negotiation.
Payment state as an explicit machine, paid only through an authenticated PSP channel, an immutable double-entry ledger and daily reconciliation. Cards without touching PAN and no real charge outside production.
$ schematize install paymentsNon-negotiable floors
Never switched off "to go faster". Full list in the skill.
Never charge outside prd
Charges, refunds, payouts and tax documents only in sandbox or homologation; a missing environment means non-prd and the production key exists only in prd.
Money is an integer in the smallest unit
Cents plus currency, never float; the sum of parts (splits, installments) equals the total with a deterministic remainder.
Never touch PAN
Capture through the PSP; your system sees only a token, brand and last 4 digits, and CVV is never stored. Target: SAQ A.
Payment state is an explicit machine
Transitions as pure functions tested in a table, terminal states never return and an unknown event never becomes paid.
Paid only via an authenticated PSP channel
The browser redirect is UX, not proof; amount and currency are checked against what was charged.
Webhook authenticated, deduplicated, re-queried
HMAC over the raw body in constant time or mTLS, dedupe by event id, and a re-query of the API before any irreversible effect.
Idempotency on every creation
Key persisted before the call (Idempotency-Key, PIX txid, refund id); a timeout is not a failure.
Immutable ledger and daily reconciliation
Append-only double entry, corrections by inverse entries, and reconciliation across ledger, PSP and bank statement with exceptions that have an owner and a deadline.
Commands
Installed in .claude/commands/. Run /pay-help anytime.
/pay-ccContext compact: writes the handoff to the archive and runs /compact./pay-claudeCreates or merges the always-on CLAUDE.md for the payments baseline at the repo root (won't overwrite other skills' blocks)./pay-flowDesigns a payment method's flow (states, ledger entries, idempotency) before integrating./pay-handoffWrites the context handoff (context.md + checklist.md) to the archive, without compacting./pay-helpLists every command and what it does./pay-loadForce-loads the whole payments normative body and applies it for the session./pay-reconcileDesigns or audits the daily reconciliation between ledger, PSP and bank statement./pay-reviewReviews payment code against the baseline: runs the gate, then reads what the machine cannot./pay-sandboxProves nothing charges outside prd: fail-closed environment, keys, test doubles and synthetic data./pay-webhookBuilds or audits the PSP webhook receiver: authenticity, dedupe, ordering and re-query.For AI agents
Install with no human in the loop. Metadata in llms.txt.
- Run: git clone https://github.com/schematizeme/skill-payments.git && ./skill-payments/install.sh
- Or download: https://github.com/schematizeme/skill-payments/releases/latest/download/skill-payments.zip and unzip into .claude/skills/
- Copy assets/CLAUDE.md to the repo root (always-on rule).
- Confirm with /pay-help.
আলোচনা
লোড হচ্ছে…