← Back
Home › Systems › Finance, HR and back office

invoicing

invoicing and accounts receivable

FreshBooks, Stripe Invoicing

SystemTechniques · 19Primitives · 74 invoicing Template enginescompilers · medium: Compile templates with loops, partials and auto-escaping into render functionsDeterministic simulation testingdistributed · medium: Run the whole system in one thread under a seeded scheduler with simulated network, disk and clock, so every failure replays from its seed.›Primary-backup replicationdistributed · medium: One node orders all writes and ships them to standbys; the acknowledgement rule (none, one, all) sets what a crash loses, and an external arbiter decides who takes over.›Payment state machinefinance · medium: Persisted state machine for a payment lifecycle (authorize, capture, void, refund) that treats timeouts as unknown, retries with the same key and applies webhooks idempotently.›Email delivery smtpnetworking · medium: Outbound SMTP: queues, MX lookup, retries, bounces, feedback loops and IP warm-upWebhook deliverynetworking · medium: Reliable server-to-server HTTP callbacks: signed POSTs, 2xx-means-done, retries over days with jitter, endpoint disabling, SSRF guards and idempotent receivers.›Coverage-guided fuzzingsecurity · medium: Mutate inputs, run an instrumented target, and keep any input that reaches a new code edge; feedback turns blind guessing into incremental search.›Idempotency keysfinance · low: Client-chosen unique key per logical operation, stored with a request fingerprint and the final response, so retries replay the first result instead of acting twice.›Exponential backoff with jittersystems · low: Retry after delays that grow geometrically and are randomized, so failed clients spread out instead of hammering a recovering service in synchronized waves.›Calendar date arithmeticsystems · low: Civil dates, time zones (tzdb), DST gaps, month-end anchoring and duration mathHdr histogramdata-structures · low: Log-linear bucketed histograms with bounded relative error for latency percentilesCurrency cross rate triangulationfinance · low: Deriving cross rates through a base currency with correct precision, inversion and spreadsDouble-entry ledgerfinance · low: Append-only journal of transactions whose postings sum to zero per currency; balances are derived, so money can only move, never appear or vanish.›Largest remainder roundingfinance · low: Splitting an amount into parts that sum exactly (largest remainder / Hamilton) for allocations, splits and prorationsMoney representationfinance · low: Store money as integer minor units with an explicit currency exponent, compute in wider integers, and round once with a named rounding mode.›Proration calculationfinance · low: Prorating charges and credits for mid-cycle plan changes by time usedReconciliationfinance · low: Match internal ledger records against bank and processor statements by reference, then amount and date window; every unmatched or mismatched item becomes an exception.›Revenue recognition schedulesfinance · low: Deferred revenue schedules that recognize income over service periods (ASC 606 / IFRS 15)Process supervisionhardware-os · low: A parent process starts services, reaps their exits and restarts them under a delay and burst-limit policy, then stops them with SIGTERM before SIGKILL.›Open and click trackingnetworking · low: Tracking pixels and signed redirect links for engagement eventsMutual TLSsecurity · low: TLS where the client also proves a certificate key, so every connection carries a verified, rotatable machine identity.›Gapless sequence numbersstorage · low: Gap-free, monotonic numbering (invoices, journal entries) under concurrency and rollbacksCron schedulingsystems · low: Cron expression parsing and next-fire-time computation, with catch-up and time-zone rules+ 12 more techniques+ 58 more primitives

Similar systems

Share the most building blocks with this one.