Financial Primitives
Settlement Calendars & Cycles
Forecasting exact deposit clearance dates with holiday and cut-off window adjustments.
Configuring Calendars
Acquirers operate across diverse regional banking networks with unique holiday schedules:
calendars.tstypescript
import { SettlementCalendar, SettlementPolicy } from "@trivio.ink/core";
// 1. Regional clearing house calendar
export const srilankaCalendar: SettlementCalendar = {
id: "CAL_LK_CENTRAL_BANK",
version: "2026.1",
timeZone: "Asia/Colombo",
workingDays: [1, 2, 3, 4, 5], // Monday through Friday
holidays: [
"2026-01-14", // Tamil Thai Pongal Day
"2026-02-04", // National Day
"2026-04-13", // Day prior to Sinhala & Tamil New Year
"2026-04-14", // Sinhala & Tamil New Year Day
"2026-05-01", // May Day
"2026-12-25", // Christmas Day
],
};
// 2. Acquirer T+2 settlement agreement
export const standardPolicy: SettlementPolicy = {
id: "POL_ACQ_T2",
version: "1.0.0",
acquirerId: "ACQ_COMMERCIAL",
currency: "LKR",
effectiveFrom: "2026-01-01",
cycleLength: 2,
cycleUnit: "business_days",
cutOffTime: "16:00:00",
timeZone: "Asia/Colombo",
calendarId: "CAL_LK_CENTRAL_BANK",
};Cut-Off Shift Logic
If a transaction occurs at 17:30 UTC when the acquirer cut-off is 16:00 UTC, the transaction is bundled into the subsequent banking day's batch before applying the T+N cycle shift.
