Audit-Grade Financial Controls Built Into the Database Layer
OpenTeq does not rely on fragile application-layer conventions for tenant isolation or accounting integrity. Every financial and security invariant is enforced directly in PostgreSQL constraints, triggers, and strict monorepo package boundaries.
Forced Multi-Tenant PostgreSQL Row-Level Security (RLS)
Every tenant-scoped table enforces ENABLE ROW LEVEL SECURITY and FORCE ROW LEVEL SECURITY. Every query runs inside a transaction binding SET LOCAL app.current_tenant_id, preventing cross-tenant data leakage even across pooled connections.
Two-Stage B2B ACH Settlement Protection
For us_bank_account (ACH) debits, payment_intent.processing moves invoices into pending_settlement and holds balances in clearing_ach—never recognizing premature revenue or releasing partner payouts until payment_intent.succeeded confirms bank finality.
Append-Only Zero-Sum Double-Entry Ledger
Database triggers prohibit UPDATE and DELETE on posted ledger rows, and a deferrable commit constraint verifies SUM(debits) = SUM(credits) in integer minor units (bigint cents) on every transaction group. ACH R01/R10 returns write immutable reversing entries.
Stripe Connect Isolation & Deterministic Idempotency
Every outbound Stripe request passes { stripeAccount: connectedAccountId } and a deterministic domain key ({tenantId}:{entityType}:{entityId}:{operation}:v{n}). Incoming webhooks verify raw-buffer signatures and deduplicate atomically in stripe_webhook_events.
Ready to deploy autonomous Order-to-Cash across your NetSuite & Stripe Connect stack?
Start with a single Wave 1 agent or equip a complete role blueprint. Every tenant runs on forced PostgreSQL RLS and zero-sum double-entry accounting.