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.
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.
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
Configure the transaction gross amount and merchant agreement terms.
Settlement Calendar & Policy
Deterministic Settlement Output
Calculated locally without cloud round-trips or IEEE-754 float drift.
roundHalfUpDiv).The Three Trivio SDKs
A modular monorepo architecture designed for seamless backend, frontend, and offline ledger integrations.
@trivio.ink/core
Deterministic mathematical calculation engine. Computes percentage MDR, fixed transaction fees, and settlement dates across calendars.
- Pure TypeScript calculation engine
- Works offline in any runtime
@trivio.ink/node
Server-side SDK foundation for backend services, ERPs, and payment gateways. Includes TrivioClient and BigInt-safe ledger serialization.
- Pre-configured client instances
- Crash-free JSON ledger snapshots
@trivio.ink/react
Ready-to-use React UI components and hooks for merchant portals. Includes TrivioSettlementSummary, TrivioFeeBreakdown, and formatters.
- Currency exponent-aware formatting
- Accessible React component trees
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.
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 clearanceThe 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.
