Repository navigation
KB: model DCC (Dynamic Currency Conversion) markup as a first-class surcharge - #28
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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'toFEE_KINDS(ridesrule_json; no DB migration).surcharges.ts— add adcc()builder mirroringforex()(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 showskindgenerically.Populated (where figures are known)
verified:falseverified:falseverified:trueEach 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/60tsc --noEmit+ eslint cleanMore 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