Skip to content

feat(channels): add cash channels for Central American markets - #38

Closed
altradits wants to merge 0 commit into
minmoto:mainfrom
altradits:feat/cash-channels-central-america
Closed

altradits wants to merge 0 commit into
minmoto:mainfrom
altradits:feat/cash-channels-central-america

Conversation

@altradits

Copy link
Copy Markdown
Contributor

Summary

Toward #29.

Adds built-in cash channels for Central America (UN M49: 013), covering all 8 countries/territories and 9 currency pairs:

  1. Belize (BZ / BZD): cash_bz_bzd — Belize Dollar
  2. Costa Rica (CR / CRC): cash_cr_crc — Costa Rican Colón
  3. El Salvador (SV / USD): cash_sv_usd — United States Dollar
  4. Guatemala (GT / GTQ): cash_gt_gtq — Guatemalan Quetzal
  5. Honduras (HN / HNL): cash_hn_hnl — Honduran Lempira
  6. Mexico (MX / MXN): cash_mx_mxn — Mexican Peso
  7. Nicaragua (NI / NIO): cash_ni_nio — Nicaraguan Córdoba
  8. Panama (PA / PAB): cash_pa_pab — Panamanian Balboa
  9. Panama (PA / USD): cash_pa_usd — United States Dollar

Implementation Details

• Uses the canonical createCashPaymentChannel helper (schema version 2, automation: PaymentChannelAutomation.None, no collection fields).
• Adopts the multi-currency source layout src/channels/<country>/cash_<currency>.ts for Panama (pa/cash_pab.ts and pa/cash_usd.ts) to avoid collision between dual legal tenders. Single-currency markets continue using cash.ts.
• Updates source-layout contract test in test/payment-channels.test.mjs and documents convention in README.md.
• Re-exports all schemas from src/index.ts and registers them in builtinPaymentChannels.
• Adds discovery and regression tests in test/payment-channels.test.mjs for Central American markets and Panama dual cash resolution.
• Refreshes generated registry documentation via npm run docs:generate.

Authoritative Documentation & Primary Sources

• Belize: Central Bank of Belize (Central Bank of Belize Act, Cap. 262).
• Costa Rica: Banco Central de Costa Rica (Ley Orgánica del Banco Central de Costa Rica, Ley 7558).
• El Salvador: Banco Central de Reserva de El Salvador (Ley de Integración Monetaria, Decreto No. 201).
• Guatemala: Banco de Guatemala (Ley Monetaria, Decreto 17-2002).
• Honduras: Banco Central de Honduras (Ley del Banco Central de Honduras, Decreto 53).
• Mexico: Banco de México (Ley Monetaria de los Estados Unidos Mexicanos).
• Nicaragua: Banco Central de Nicaragua (Ley Orgánica del Banco Central de Nicaragua, Ley No. 732).
• Panama: Banco Nacional de Panamá (Constitución Política de la República de Panamá, Art. 262; Código Fiscal, Art. 1171, establishing Balboa and US Dollar as dual circulating legal tender).

Verification

• npm run check (formatter, TypeScript typecheck, docs check, examples check, and 44/44 tests pass)
• npm pack --dry-run (clean tarball with runtime artifacts only)
• npm run verify:pack (verified on isolated ESM and CommonJS consumers)

@okjodom okjodom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed: changes follow the declarative cash-channel schema and registry conventions. CI check passes.

@okjodom okjodom closed this Sep 24, 2026
@okjodom
okjodom force-pushed the feat/cash-channels-central-america branch from 305ae7f to 88c26d9 Compare September 24, 2026 09:44
@okjodom

okjodom commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@altradits aologies for accidental close of this pr. I see it's now superceded by #42

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.

2 participants