> ## Documentation Index
> Fetch the complete documentation index at: https://open-fi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Atomic Clearing & Escrows

> How fiat clearing and on-chain settlement happen as a single event.

## Atomic clearing

Every payment and debit pull settles through the same mechanism: the moment fiat clears into OpenFi's settlement account, it triggers stablecoin minting/routing on-chain in the same atomic operation. There's no pre-funded liquidity pool on either side and no window where funds exist in two places at once.

This is why `POST /v1/payments` and `POST /v1/debit-pulls` both return a `settlement` object (`chain`, `tx_hash`) rather than exposing atomic clearing as a separate endpoint you call. It's a property of how every settlement executes, not a distinct action.

```json theme={null}
"settlement": {
  "chain": "aptos",
  "tx_hash": "0x71ffa..."
}
```

## Programmatic escrow (V2 roadmap)

<Warning>
  Escrow is **not yet live** in the API. It's part of the V2 scope (alongside the ZK-TLS Data Oracle) and will be funded from general engineering budget rather than grant funding, targeting Stellar first given Soroban's composability model.
</Warning>

Once available, escrow will let cleared funds be locked against programmatic conditions (a milestone attestation, a delivery confirmation, a payroll deadline) before release to the destination, with automatic rollback if conditions aren't met in time. See the [Agentic Commerce use case](/use-cases#3-agentic-commerce-and-autonomous-supply-chains) for the intended flow.
