FurlPay Docs
Open App
  • Platform Overviewupdated
  • API Referencenew
  • 5-Minute Sandbox Quickstartupdated
  • Sandbox & Test Assetsnew
  • Create a Developer Account
  • Identity & KYC Verification
  • Passkeys & Biometrics
  • Transaction Statuses & Retries
  • Frequently Asked Questions
  • Core Primitives & Money Modelnew
  • Merchant Payments & Invoices
  • Contractor Payroll & Batch Payouts
  • EIP-3009 Gasless & Recurring
  • Circle CCTP Cross-Chain
  • LI.FI Cross-Chain Swaps
  • Solana Actions & Blinks
  • Wallet Infrastructure & Handles
  • Market Data Streams
  • Gasless Transfers Availability
  • Deposits & Withdrawals Support
  • Agentic Finance Overviewupdated
  • x402 & MPP Settlement Gatewayupdated
  • Agent Identity, Trust & TAP Mandatesupdated
  • Autonomous Finance & Policies
  • Claude Connector (MCP + OAuth 2.1)
  • AI Assistants & HITL Approvals
  • x402 Monetization Basics
  • Settlement Workspace & Maker-Checker
  • Transaction Truth & Double-Entry Ledgerupdated
  • Par 1:1 Routing Simulator Overview
  • Par Quote Engine & Swap Lifecycle
  • Par Networks & Settlement Assets
  • Par Operator Console
  • Par API Reference
  • Par Webhooks
  • Par AML & Travel Rule
  • Screening, Monitoring & Travel Rule
  • Circle Integration
  • Stripe Crypto Integration
  • Persona KYC Integration
  • API Conventions & Idempotencyupdated
  • Authentication, Keys & Versioning
  • Webhooks (PUSH HMAC-SHA512 & PULL)
  • Errors & Exception Playbooks
  • Rate Limits & Retry-After
  • Official SDKs (TS, Python, Go, Rust)updated
  • FurlPay CLI (@furlpay/cli) & MCP
  • Monorepo & Package Reference
  • SDK & API Integration Support
  • Cryptographic Architecture & KMS
  • Security Posture & Isolation
  • Signing Boundaries & WebAuthn
  • Production Configuration & Workers
  • Colocation Directory
  • Security & Compliance Frameworks
  • Regulatory & Launch Posture
  • Privacy, Redaction & GDPR

CLI full reference

  • CLI overview & install
  • Command index
  • MCP tool reference
  • Honesty matrix

Resources

  • Interactive Developer Workbench
  • Operational Status (/status)
  • Release Changelog
  • OpenAPI 3.1 Spec
  • Postman Collection
  • llms.txt (AI Index)
  • llms-full.txt (Full Docs)
  • Network & Assets
  • Proof of Reserves
  • Terms of Service
  • Privacy & DPA
  • Regulatory Disclosures
  • Security Disclosures
  • Contact Support
  • GitHub
Docs/04. Treasury and Institutional Finance/Transaction Truth & Double-Entry Ledger

04. Treasury and Institutional Finance

Transaction Truth, State Machines & Double-Entry Ledger

One authoritative reconciliation across payment intents, policy decisions, settlement outbox states, exact asset decimal precision, and balanced double-entry accounting—clearly separating simulated execution from on-chain finality.

Submission is never settled settlement

An HTTP 200 or 202 from /api/intents, /api/settlement/execute, or a transaction hash submission never counts as final settlement. An order only transitions to SETTLED after independent chain receipt/Transfer verification (or explicit simulated: true simulator completion using 0xsim_* refs).

Canonical 16-stage lifecycle vs. runtime enforcement

FurlPay intentionally separates the Decision Machine (@furlpay/control-plane PaymentPhase) from the Execution Machine (SettlementLifecycleStatus) so “waiting on a human approver” can never be confused with “waiting on an on-chain block”:

Conceptual StagePolicy Decision (PaymentPhase)Settlement Order StateSandbox Equivalent & Guard
1. Intent created & validatedPre-decisionDRAFTQuote + SHA-256 payloadHash compiled
2. Policy & screening evaluatedAUTHORIZED / HOLD / DENIEDDRAFT -> REJECTEDCountry/OFAC check (451) + x402 ceiling (403)
3. Awaiting human approvalPENDING_APPROVAL / HOLDPENDING_APPROVALpending_approval; EXECUTE refused without approvedAt
4. Human / maker-checker approvedAPPROVEDAPPROVEDsimulate-approval / WebAuthn passkey step-up
5. Enqueued / signing requestedEXECUTINGEXECUTION_QUEUEDCloud KMS transactionGuard validates destination & calldata
6. Signed, submitted & confirmingEXECUTINGEXECUTING / RECONCILIATION_REQUIREDTimeout stays non-terminal until chain receipt verified
7. Confirmed & settledSETTLEDSETTLEDsettled (0xsim_* in sandbox; decoded Transfer log in prod)
8. Terminal refusal / expiry / reversalFAILED / DENIED / EXPIRED / REVERSEDFAILED / REJECTED / EXPIRED / CANCELLED / REVERSEDTimeout always resolves HOLD | DENY, never silent ALLOW

Asset decimals, exact arithmetic & double-entry ledger

New money contracts forbid binary floats (float64/number). Amounts cross HTTP as decimal strings paired with exact integer base units:

  • USDC / USDT / Sandbox USD: 6 decimal places (1.00 USDC = 1_000_000n micro-units via parseDecimalUsdToMicros); conversion spread and platformFeeBps round deterministically in integer bigint math.
  • Solana (SOL): 9 decimals (lamports). EVM Native Gas (ETH/POL): 18 decimals (wei).
  • Balanced Ledger Invariant (@furlpay/ledger): Every journal transaction requires >= 2 postings with sum(debits) === sum(credits) in positive integer minor units. Postings are append-only; corrections post a single-use compensating reverse() entry rather than mutating history.
  • Reconciliation: Unknown/timed-out settlement broadcasts route to RECONCILIATION_REQUIRED rather than duplicate blind retries (Settlement Workspace).

Execution boundary transparency

CapabilityStatusEvidence
Non-custodial intent builders & on-chain verificationVERIFIED_PRODUCTION/api/intents and /api/transactions/* construct caller-signed payloads without holding keys.
Pure control-plane FSM & double-entry ledgerAUDITED_LEDGEREnforced across @furlpay/control-plane, @furlpay/ledger, and PostgreSQL trigger-protected audit tables.
Relayed institutional settlement workerIMPLEMENTED_NOT_DEPLOYEDSandbox simulation active; production execution fails closed (503 settlement_disarmed) until KMS signers & RPCs are armed.

Related endpoints

MethodPathDescription
POST/api/intentsValidate and construct a canonical payment intent.
POST/api/transactions/preparePrepare non-custodial wallet transaction parameters.
POST/api/settlement/executePolicy-driven settlement order creation, approval, and 202 outbox queueing (gated).
GET/api/cron/reconcileScheduled internal reconciliation pass (INTERNAL_ONLY cron auth).
GET/api/cron/settlement-workerScheduled transactional outbox drainer and recovery reconciler (INTERNAL_ONLY).
Did this page help?
Edit this page on GitHub

Previous

Settlement Workspace & Maker-Checker

Next

Par 1:1 Routing Simulator Overview