Skip to content

KB: model DCC (Dynamic Currency Conversion) markup as a first-class surcharge - #28

Merged
ankitkr merged 2 commits into
mainfrom
feat/kb-dcc-modeling
Jul 30, 2026
Merged

ankitkr merged 2 commits into
mainfrom
feat/kb-dcc-modeling

Conversation

@ankitkr

@ankitkr ankitkr commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Models DCC markup as its own fee — surfaced by the Grok check on the latest Axis T&C revision (28-Jul-2026).

Why a new kind

DCC (levied when a foreign merchant/website bills the transaction in INR) is distinct from the forex markup (kind: 'international', billed in foreign currency) — and is often stacked on top and worse. They should be separate rows.

Change

  • schema.ts — add 'dcc' to FEE_KINDS (rides rule_json; no DB migration).
  • surcharges.ts — add a dcc() builder mirroring forex() (per-txn, +GST), so it flows through the same seed-merge → verify-entity → admin-UI (expandable detail) path. No UI change needed — the detail renderer shows kind generically.

Populated (where figures are known)

Card DCC Source
Axis Magnus / Magnus-Burgundy 1.5% → 2% (eff 28-Aug-2026) Axis 28-Jul T&C; community → verified:false
Axis Privilege (mid-tier) 1.5% → 3.5% (eff 28-Aug-2026) community → verified:false
HDFC Regalia Gold 1.75% (eff 15-May-2026) OFFICIAL MITC v4.4 → verified:true

Each is a separate surcharge alongside the card's existing forex entry, effective-dated to the announced change date.

Verification

  • pnpm kb:sql — validates (102 cards)
  • pnpm vitest run — 60/60
  • tsc --noEmit + eslint clean

More Axis mid-tier cards (Ace/Flipkart/Airtel co-brands, Atlas) can get DCC rows once their specific figures are confirmed — flagged for a later pass.

🤖 Generated with Claude Code

Ankit Kumar added 2 commits July 30, 2026 13:48
…urcharge

DCC (charged when a foreign merchant/site bills in INR) is a distinct fee from
the forex markup (billed in foreign currency) and is often stacked on top / worse.
Add a 'dcc' kind to FEE_KINDS and a dcc() builder mirroring forex(), so it flows
through the same seed-merge / verify-entity / admin-UI machinery. No migration
(surcharges ride rule_json).

Populated where figures are known:
- axis-magnus / axis-magnus-burgundy: DCC 1.5% → 2% (eff 28-Aug-2026; Axis 28-Jul
  T&C revision). Distinct from the 2% forex markup. Community → verified:false.
- axis-privilege: mid-tier DCC 1.5% → 3.5% (eff 28-Aug-2026). Community.
- hdfc-regalia-gold: DCC 1.75% (eff 15-May-2026, OFFICIAL MITC v4.4), separate
  from the 2% FCY markup → verified:true.

Seed validates (102 cards); 60 tests + typecheck + lint clean.
surchargesFor() now synthesizes a DCC surcharge for every card that has a forex
('international') markup but no explicit 'dcc' — DCC defaults to the forex rate
(issuers apply the same cross-currency markup on INR-billed international/DCC
txns). Derived entries are verified:false with a "= forex markup, verify" note;
the 4 explicit overrides (Axis Magnus/Burgundy/Privilege, HDFC Regalia) keep
their authoritative values. 97/102 cards now carry a DCC (5 have no forex to
derive from). Seed validates; 60 tests + typecheck + lint clean.
@ankitkr
ankitkr merged commit b2f1134 into main Jul 30, 2026
1 check passed
@ankitkr
ankitkr deleted the feat/kb-dcc-modeling branch July 30, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant