Trivio Logo
Stage 3C Complete — Trivio SDKs v0.1.0 Now Live on npm

Payment Settlement Intelligence for Engineers

Deterministic fee calculation engines and settlement calendar forecasting. Model MDR, acquirer fees, and holiday-aware clearance cycles locally in developer infrastructure with zero float math.

$npm install @trivio.ink/core
Apache-2.0

Engineered for Financial Accuracy

Traditional payment SDKs assume simplistic float math and static settlement. Trivio solves the four hardest problems in payment reconciliation.

Zero-Float Precision

Calculations execute strictly in integer minor units with BigInt intermediate precision. Eliminates IEEE-754 penny-rounding errors.

Holiday & Cut-Off Aware

Accurately models T+N settlement cycles, daily bank cut-off windows, and regional public holidays across worldwide clearing networks.

Developer-Owned Data

Calculation engines run 100% locally in your Node.js or browser runtime. No mandatory cloud telemetry and zero raw cardholder data required.

Apache-2.0 Open Source

Free and open-source SDKs for Core, Node.js, and React. Zero runtime dependencies in @trivio.ink/core for maximum reliability.

Live Web Demonstration

Interactive Settlement Calculator

Test the live calculation engine right in your browser. Configure transaction amounts, merchant fee agreements, and settlement calendar policies.

Transaction & Fee Inputs

Zero-Float Math

Configure the transaction gross amount and merchant agreement terms.

bps
100 bps = 1.00%
e.g. $15.00 wire / batch

Settlement Calendar & Policy

Deterministic Settlement Output

Live @trivio.ink/core

Calculated locally without cloud round-trips or IEEE-754 float drift.

Estimated Net Settlement Amount
$9,735.00
Gross $10000.00 minus $265.00 fees
Gross Transaction Amount:$10000.00
Percentage Fee (2.50%):-$250.00
Fixed Transaction Fee:-$15.00
Total Deductions:-$265.00
Expected Settlement Date:2026-11-17
Trivio Financial Invariant: Precision is preserved down to exact minor units using BigInt integer arithmetic with Round-Half-Up (roundHalfUpDiv).

The Three Trivio SDKs

A modular monorepo architecture designed for seamless backend, frontend, and offline ledger integrations.

Zero Runtime Deps
v0.1.0

@trivio.ink/core

Deterministic mathematical calculation engine. Computes percentage MDR, fixed transaction fees, and settlement dates across calendars.

npm i @trivio.ink/core
  • Pure TypeScript calculation engine
  • Works offline in any runtime
Server SDK
v0.1.0

@trivio.ink/node

Server-side SDK foundation for backend services, ERPs, and payment gateways. Includes TrivioClient and BigInt-safe ledger serialization.

npm i @trivio.ink/node
  • Pre-configured client instances
  • Crash-free JSON ledger snapshots
UI Components
v0.1.0

@trivio.ink/react

Ready-to-use React UI components and hooks for merchant portals. Includes TrivioSettlementSummary, TrivioFeeBreakdown, and formatters.

npm i @trivio.ink/react
  • Currency exponent-aware formatting
  • Accessible React component trees
Developer Experience

Deterministic Calculations in 5 Lines of Code

Integrate Trivio into your payment authorization pipelines, backend checkout handlers, or batch payout workers. All types are strictly validated at compile-time.

Zero dependency risk in calculation primitives
Supports dynamic tiers, minimum fee thresholds, and caps
Explicit deterministic rounding policy (Round-Half-Up)
settlement-example.tstypescript
import { calculatePaymentSettlementEstimate } from "@trivio.ink/core";

// Deterministic settlement estimate
const estimate = calculatePaymentSettlementEstimate({
  grossMinor: 1000000n, // $10,000.00 represented in minor currency units (cents)
  feeRule: {
    percentageBps: 250, // 2.50% Merchant Discount Rate (MDR)
    fixedFeeMinor: 1500n, // $15.00 fixed acquirer deduction
  },
  settlementPolicy: {
    cycleDays: 1, // T+1 settlement cycle
    cutOffTimeUtc: "16:00", // Acquirer batch cut-off time
    weekendHandling: "NEXT_BUSINESS_DAY",
    holidays: ["2026-12-25", "2027-01-01"],
  },
  transactionTimeUtc: "2026-11-16T17:30:00Z", // Past cut-off window
});

console.log(estimate.netMinor); 
// 973500n -> Exactly $9,735.00 net settlement without IEEE-754 floating point loss
console.log(estimate.expectedSettlementDate); 
// "2026-11-18" -> Shifted past cut-off to Wednesday clearance
Planned Future Architecture

The Future: Trivio Cloud Settlement Platform

While our core calculation SDKs will always remain 100% free and open-source, upcoming stages will introduce optional hosted cloud intelligence, acquirer batch reconciliation, and multi-tenant merchant portals.