Credit card facility engine¶
| ID | MOD-167 |
| System | SD05 |
| Repo | bank-credit |
| Build status | Not started |
| Deployed | No |
What this module does¶
Credit card facility engine. Manages the full lifecycle of a revolving credit card facility from opening through to closure: balance tracking, billing cycles, interest accrual, minimum repayment calculation, statement generation, and the real-time JIT-funding webhook that sits in the card-authorisation path.
This module ID is reserved per ADR-058 (credit card platform boundary). It is not built until a credit card product is formally greenlit by the CEO/Board (ADR-058 Phase 2).
Why it exists¶
ADR-058 established the credit card platform boundary and determined that the credit card facility engine is the only substantive new platform module required to launch a credit card programme. All other boundary decisions — scheme/processor abstraction (PAY-008), physical card records (MOD-124 credit-ready columns), and credit decisioning (MOD-029/031) — have already been addressed as pre-work.
The module ID is reserved here so that cross-references in ADR-058, PAY-008, and MOD-124 (credit_facility_id column) are stable and do not drift to an unrelated module if the number is allocated in the interim.
Responsibilities¶
When built, this module owns:
- Facility management — open, limit changes, suspension, closure of revolving credit facilities. Maps to a
credit.loan_accountsrow withproduct_type = 'CREDIT_CARD'. - Balance tracking — real-time available credit = facility limit − outstanding balance − pending authorisations.
- Billing cycle engine — monthly cycle cut, statement balance, minimum repayment calculation per NZ and AU regulatory requirements (minimum of 2% of outstanding or $25, whichever is greater, per jurisdiction rules).
- Interest accrual — daily interest on the revolving balance at the applicable rate; posted via MOD-001
posting_type = 'ACCRUAL'. - JIT-funding webhook — the only platform component sitting in the sub-100ms card-authorisation path. Receives authorisation requests from the issuer-processor, checks available credit in-process (no external I/O in the response path), and responds with approve/decline. Performance target: p99 < 80ms under steady-state load (PAY-008 mandate).
- Statement generation — monthly statements via MOD-113 (or internally until MOD-113 is extended for the credit card asset class).
- Minimum repayment reminders — dispatched via MOD-063 at billing cycle close.
- IFRS 9 integration — revolving balance feeds MOD-031 ECL calculation as the EAD for the CREDIT_CARD product type.
Pre-work already done (ADR-058)¶
The following changes were made before this module is built:
- MOD-124 —
payments.physical_cardsextended withcard_type = 'credit'option,credit_facility_id UUID(links to this module's facility record), andbin_range_type(sponsor|principal). - PAY-008 — Card scheme abstraction policy extended with processor-neutral interface, scheme-neutral BIN range configuration, JIT-funding webhook p99 < 80ms mandate, and processor-switch covenant (PAN/token portability as RFP non-negotiable).
What triggers the build¶
A formal credit card product greenlight decision by the CEO/Board, followed by selection of an issuer-processor and card scheme. ADR-058 Phase 2 is the trigger. Until then this module remains Not started and deployed: false.
Design notes (pre-greenlit)¶
- Follows the MOD-117 (overdraft management) pattern for revolving product management within the SD05 credit domain.
- The JIT-funding webhook must be architecturally isolated from the rest of the module — it must not share a Lambda with any path that calls external services (database reads should be warm-cache or in-memory for the authorisation response).
- NZ and AU minimum repayment rules differ; jurisdiction-aware billing cycle logic is required from day one.
- BIN range sponsorship is a distinct credit-card-specific relationship from the debit/eftpos sponsorship (PAY-008 §BIN range sponsorship). This requires separate negotiation with a sponsor bank that holds credit-card BIN sponsorship capability.
Module dependencies¶
Depends on¶
| Module | Title | Required? | Contract | Reason |
|---|---|---|---|---|
| MOD-001 | Double-entry posting engine | Required | — | All credit card postings — purchases, repayments, interest accruals, fee charges — are written to the double-entry ledger via the posting engine. |
| MOD-029 | Pre-approval engine | Required | — | Credit card origination requires a credit assessment and affordability check before a facility is opened. |
| MOD-031 | ECL calculation & GL posting | Required | — | Credit card revolving balances contribute to portfolio ECL; MOD-031 reads credit.loan_accounts to compute provisions for the credit card asset class. |
| MOD-124 | Physical card issuance and bureau integration | Required | — | Physical card records carry credit_facility_id linking the card to its MOD-167 facility, and card_type='credit' set at issuance. |
| MOD-005 | Daily accrual calculator | Optional | — | Daily interest accrual for revolving balances; v1 may compute accrual internally following MOD-005 pattern rather than depending on the shared accrual engine. |
| MOD-113 | Statement generation | Optional | — | Monthly credit card statements generated via the statement engine; v1 may generate statements internally until MOD-113 is extended for the credit card asset class. |
Required by¶
(No modules in this wiki currently declare a dependency on this module.)
Policies satisfied¶
| Policy | Title | Mode | How |
|---|---|---|---|
| CRE-001 | Credit Risk Management Policy | AUTO |
Credit card revolving facility balance and utilisation are tracked per customer account with full audit trail for credit risk reporting. |
| CRE-006 | Impairment & Provisioning Policy | CALC |
Credit card asset class contributes to IFRS 9 ECL calculations — revolving balance is the EAD; product-type LGD and PD are applied by MOD-031 once MOD-167 feeds the credit.loan_accounts table. |
| CON-004 | Product Disclosure & Sales Practice Policy | GATE |
Minimum repayment disclosures and billing-cycle statements are gated on delivery confirmation before the next billing cycle opens. |
| PAY-008 | Payment Routing, Sponsor & Card-Scheme Abstraction Policy | AUTO |
JIT-funding webhook responds to issuer-processor authorisation requests within p99 < 80ms by querying available credit in-process with no blocking external I/O. |
Capabilities satisfied¶
(No capabilities mapped)
Part of SD05 — Credit Decisioning & Loan Platform
Compiled 2026-05-22 from source/entities/modules/MOD-167.yaml