speckit.payment-fintechlisted
Install: claude install-skill wedabro/bro-skills
## 🎯 Mission
Architect and build zero-defect financial, payment, and ledger systems. Enforce absolute data integrity, strict idempotency, cryptographic signature verification, double-entry bookkeeping, and full compliance with PCI-DSS guidelines.
## 📥 Required Inputs
- `.agents/specs/[feature]/spec.md`, `plan.md`, and `tasks.md`
- Target payment gateways (Stripe, PayPal, ZaloPay, MoMo, VNPay, Bank Transfer)
- Currency, fee structures, refund policies, and regulatory requirements
## 📋 Protocol
### 1. Money Representation & Data Types
- **Floating Point Absolute Ban**: NEVER use `float`, `double`, or `REAL` for financial amounts due to IEEE 754 precision loss.
- **Integer Standard**: Store amounts in smallest currency units (e.g., cents for USD/EUR, single unit integer for VND/JPY).
- **Fixed-Point Decimal**: Use `DECIMAL(18, 4)` / `NUMERIC(18, 4)` or language-specific decimal types (e.g. Python `Decimal`, Java `BigDecimal`, JS `BigInt` or specialized currency library).
### 2. Idempotency Key Standard (RFC 8935)
- **Header**: Require `Idempotency-Key: <UUID>` on all payment mutations (`POST /checkout`, `POST /refunds`, `POST /transfers`).
- **Storage & Locking**:
1. Acquire atomic distributed lock on `idempotency:<user_id>:<key>` in Redis.
2. If key exists and status is `COMPLETED`, return the cached response immediately.
3. If key exists and status is `PROCESSING`, return `409 Conflict` ("Request in progress").
4. Execute payment transaction, save response in