Skip to content

Add FX settlement invoice guard#583

Open
soave0529-oss wants to merge 2 commits into
SCIBASE-AI:mainfrom
soave0529-oss:codex/fx-settlement-invoice-20
Open

Add FX settlement invoice guard#583
soave0529-oss wants to merge 2 commits into
SCIBASE-AI:mainfrom
soave0529-oss:codex/fx-settlement-invoice-20

Conversation

@soave0529-oss

Copy link
Copy Markdown

/claim #20

Adds a self-contained fx-settlement-invoice-guard package for Revenue Infrastructure.

This slice validates whether multi-currency invoices can be released or closed when invoice currency, account currency, settlement currency, FX snapshot freshness, minor-unit rounding, processor settlement amounts, credit-note offsets, and material variance approvals are consistent.

Why this is distinct:

  • not generic subscription billing
  • not usage metering or compute replay
  • not tax/VAT handling
  • not quota rollover
  • not grant milestone billing
  • not committed-usage true-up
  • not budget-threshold notices
  • not analytics-seat licensing
  • not data-product freshness
  • not procurement approval
  • not generic invoice delivery

Artifacts included:

  • deterministic synthetic invoice packets
  • JSON results
  • Markdown reviewer report
  • SVG summary
  • short MP4 demo artifact

Validation run locally:

  • npm test
  • npm run demo
  • node --check src/index.js
  • node --check scripts/demo.js
  • node --check test/fxSettlementInvoiceGuard.test.js
  • git diff --check

Boundaries:

  • synthetic invoice packets only
  • no payment processor calls
  • no live FX market data
  • no bank details
  • no credentials
  • no private customer data

AI-assisted with OpenAI Codex; I reviewed the implementation and kept the module isolated.

@soave0529-oss

Copy link
Copy Markdown
Author

Scope clarification after checking prior same-issue work: this PR is intentionally narrower than the earlier FX settlement reconciliation submission (#225). It focuses on invoice-release rounding controls and credit-offset safety: supported currency minor units, invoice/account/settlement currency consistency, stale quote holds, processor settlement delta tolerance, credit approval evidence, and material variance blocking. It does not attempt provider fee caps, remittance reference deduplication, cross-border tax evidence, booking reconciliation, or broader settlement ledger reconciliation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant