We built a cryptographic, 2-phase commit ledge on top of Stripe's infrastructure. Guaranteeing Atomic Finality for B2B API marketplaces, eliminating failed transactions, and settling latency in under 0.4ms.
Simulated B2B transaction flow managed by the StripeLedgerAdapter.
Cryptographic finality achieved via Stripe capture_method='manual'.
Marai processes high-torque B2B transactions where a failed ledger entry implies massive operational
drift. We evaluated providers and chose Stripe specifically for the capture_method='manual'
capability.
The Stripe Beacon: We wrap every Stripe Intent in our Temporal Ledger. Phase 1 holds the funds (Auth). Phase 2 executes the cryptographic state change in our shards. Only if successful do we settle the Stripe Intent (Capture).
Zero risk. Zero failed states. Total Atomic Finality.
async def lock_funds(self, user_id, amount): # Phase 1: Stripe AUTH ONLY (Hold) intent = stripe.PaymentIntent.create( amount=amount, customer=user_id, capture_method="manual", # ← The Magic confirm=True ) return intent.id async def middleware_charge(): intent_id = await lock_funds(cid, 500) # Execute local shard logic (ACID) if local_commit_success: # Phase 2: Stripe SETTLEMENT await settle_transaction(intent_id)
This is a live simulation environment powered by the Marai Kernel using Stripe Test Mode.