Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Payments And Finance?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/thaithienvanid-payments-and-finance)
---
name: payments-and-finance
description: "In an aidd repository, use when code touches card data, PCI DSS, payment APIs, 3-D Secure, SCA, chargebacks, ledgers, refunds, currencies, money movement, KYC, AML, lending, or crypto-assets."
---
<!-- generated by `aidd gen-docs` from schemas/packs.json; edit the registry, not this file -->
# Payments and finance
## Scope
Applies when the change touches card data, ledgers, money movement. Not when the product only redirects to a hosted checkout and stores no payment state; an embedded payment form is in scope. Neighbours: `aidd-domains:enterprise-controls`, `aidd-team:resilience`, `aidd-domains:apis-and-services`.
## Terms
- **Authorization and capture**: An authorization holds the funds; a capture takes them. An uncaptured authorization expires.
- **Void, refund, and chargeback**: A void cancels before settlement, a refund returns money after it, and a chargeback is the issuer's reversal.
- **Settlement**: The day the money moves between banks, days after the authorization.
- **Minor units**: An amount as an integer in the currency's smallest unit: JPY has no decimals, KWD has three.
- **Merchant of record**: The party that sells, and answers for tax, refunds, and disputes.
## Standards
| # | Standard | Edition | Checked | Source |
| --- | --- | --- | --- | --- |
| S1 | PCI DSS | v4.0.1 | 2026-11-10 | <https://www.pcisecuritystandards.org/document_library/> |
| S2 | PSD2 strong customer authentication and its RTS | Directive (EU) 2015/2366; Delegated Regulation (EU) 2018/389 | 2026-10-16 | <https://www.eba.europa.eu/legacy/regulation-and-policy/regulatory-activities/payment-services-and-electronic-money-0> |
| S3 | KYC, AML, and sanctions screening (EU AMLR, US BSA), the crypto travel rule, and EU Verification of Payee | Regulation (EU) 2024/1624; Regulation (EU) 2024/886 | 2026-10-22 | <https://eur-lex.europa.eu/eli/reg/2024/1624/oj> |
| S4 | EMV 3-D Secure | Protocol and Core Functions Specification v2.3.1.1 | 2026-10-16 | <https://www.emvco.com/dynamic/emv-3-d-secure-whitepaper-v2/3-d-secure-documentation/3-d-secure-specification-v2-3-1/> |
| S5 | EMV payment tokenisation (network tokens) | Technical Framework v2.4 | 2026-10-16 | <https://www.emvco.com/emv-technologies/payment-tokenisation/> |
| S6 | EU Digital Operational Resilience Act | Regulation (EU) 2022/2554 | 2026-10-16 | <https://eur-lex.europa.eu/eli/reg/2022/2554/oj> |
| S7 | Double-entry and idempotent money movement | — | 2026-10-16 | — |
| S8 | EU Consumer Credit Directive (CCD2) | Directive (EU) 2023/2225 | 2026-10-17 | <https://eur-lex.europa.eu/eli/dir/2023/2225/oj> |
| S9 | US consumer credit: Truth in Lending (Regulation Z) and Equal Credit Opportunity (Regulation B) | 12 CFR Part 1026; 12 CFR Part 1002 | 2026-10-17 | <https://www.consumerfinance.gov/rules-policy/regulations/> |
| S10 | MiCA: Markets in Crypto-Assets | Regulation (EU) 2023/1114 | 2026-10-17 | <https://eur-lex.europa.eu/eli/reg/2023/1114/oj> |
## Dated obligations
| From | Obligation | Standard |
| --- | --- | --- |
| 2025-10-09 | Verification of Payee: a euro-area payment service provider checks the payee's name against the account before a credit transfer, and the rest of the EU by 2027-07-09. | S3 |
| 2026-11-20 | CCD2 applies to new EU consumer credit, buy now, pay later and loans below EUR 200 included. | S8 |
| 2027-07-10 | The EU AML Regulation applies to obliged entities, crypto-asset service providers among them. | S3 |
## Invariants and missed cases
| Always true | The case a plan misses |
| --- | --- |
| Debits equal credits for every ledger entry. | A fee, a partial refund, or a currency conversion posted on one side only. |
| A refund never exceeds what was captured, less earlier refunds. | Two concurrent partial refunds, or a refund on a charge already disputed. |
| Money moves once per idempotency key. | A webhook delivered twice, or a timed-out request retried after the PSP succeeded. |
| A settled payment is never voided. | A "cancel" on an order paid last week, which must be a refund. |
## Checklist by loop step
| Step | Item | Standard |
| --- | --- | --- |
| Before the first edit (`aidd risk --paths`) | Card data, ledgers, or money movement: the `payments` area, major, a finance reviewer. A PCI scope change is its own decision. An EU financial entity also answers to DORA. | S1, S6 |
| Specify | Double-entry invariants and idempotency for every money movement in the Acceptance; reconciliation and the audit trail named. | S7 |
| Specify | An EEA card payment names its SCA path: EMV 3DS 2 with the data for a frictionless result. It names each exemption claimed (low value, transaction risk analysis, merchant-initiated, recurring) and by whom. It names what a challenge or a failure does to the payment. | S2, S4 |
| Specify | Credit names its disclosures, its creditworthiness assessment, the human review an automated decision allows, and its adverse action reasons. A crypto-asset service names its MiCA authorisation. `references/credit-crypto-and-aml.md` holds the detail. | S8, S9, S10 |
| Specify | Onboarding and payouts screen every payer and payee against the sanctions lists before money moves, with KYC by risk. A crypto-asset transfer carries the travel rule's originator and beneficiary data. | S3 |
| Implement | No card data stored, logged, or in fixtures outside the PCI scope. The PSP's token or a network token stands in for the PAN, with its lifecycle updates handled. Amounts as integers in minor units with a currency; timestamps with an explicit zone. | S1, S5, S7 |
| Implement | Payment pages: every script inventoried with its reason and integrity check (PCI DSS 6.4.3). Payment pages also have a change- and tamper-detection mechanism that alerts on script and header changes (11.6.1). | S1 |
| Implement | A subscription shows its renewal terms before the first charge and stops as easily as it started (EU withdrawal function; US ROSCA and auto-renewal laws). | S7 |
| Review | Every payment state transition is idempotent and replay-safe; failure paths reconcile; the PSP's webhooks are verified and deduplicated before they move the ledger. | S7 |
| Review | Disputes and chargebacks: each has its own states and ledger entries. The evidence a dispute needs (the 3DS result, delivery, the customer's consent) is retrievable, and the response deadline is tracked. | S7, S4 |
| Roll out | The reconciliation report is clean for the observe window; a rollback preserves the ledger with compensating entries, never deletes. | S7 |
## Test commands
| Command | Proves | How | Standard |
| --- | --- | --- | --- |
| Ledger property tests | debits equal credits under every sequence of operations | Hypothesis (6.169.2), fast-check, or jqwik | S7 |
| Idempotency and replay tests | a repeated or replayed request moves money once | integration tests per money-moving endpoint | S7 |
| PAN scan | no card number in code, logs, or fixtures | a PAN pattern with a Luhn check over code, logs, fixtures, and test snapshots in CI, failing on any hit | S1 |
| SCA flow tests | frictionless, challenge, exemption, and failed-authentication paths each end in the right payment state | the PSP's 3DS test cards in its sandbox, one test per path | S2, S4 |
| Payment page script check | every script the payment page loads is on the inventory, with its integrity hash | the team's `e2e-test` runner, by default `@playwright/test` (1.64.1), loads the checkout, records every script request, and compares URLs and SRI hashes with the inventory file, in CI | S1 |
| Dispute flow tests | a dispute, its evidence submission, and its win or loss post the right ledger entries | the PSP's dispute test cards or its dispute simulation in its sandbox | S7 |
| Credit disclosure tests | the APR and the required disclosures match the loan's terms, and every decline states its principal reasons | golden tests per product over the disclosure and the adverse action notice | S9, S8 |
- From `aidd-domains:enterprise-controls`: Dependency scan, Static analysis, Secret scan.
- From `aidd-domains:apis-and-services`: Webhook signature and replay tests.
## Owned elsewhere
- Incident and breach notification clocks, DORA's among them: `aidd-team:incident-response`.
## References
- [references/credit-crypto-and-aml.md](references/credit-crypto-and-aml.md): credit, crypto-assets, and the AML and sanctions detail, with their dated obligations.
## Keep it current
Each entry is due after its `review_every_days` (else emerging 90 days, established 365) or by its `review_due`. An emerging one applies only when the change needs it, said in the Spec. One `aidd eval standards` lists as due is looked up in Specify, and a missing one is proposed to aidd's `schemas/industry-standards.json`.