# The Coinbax Execution Framework

> The four-phase payment lifecycle (Verify, Fund, Confirm, Settle) that runs on every Coinbax transaction.
> Source: https://developers.coinbax.com/docs/concepts/execution-framework
> Last updated: 2026-07-16

Coinbax builds payment controls for programmable money. The Coinbax
Execution Framework is the four-phase lifecycle that every transaction moves
through: **Verify, Fund, Confirm, Settle**. Each phase has a defined job,
runs a defined set of controls, and maps to specific transaction states, so
your integration always knows where a payment is and what can happen next.

```
Verify ──▶ Fund ──▶ Confirm ──▶ Settle
```

## Phase 1: Verify

**States: `PENDING`, `RISK_REVIEW`**

Compliance screening and risk scoring run before funds move. Failed payments
never reach the contract.

What runs here:

- **Request validation.** Addresses, amounts, currency, and network are
  checked against the template and workspace configuration.
- **Compliance screening.** PRE_ESCROW controls execute in order: address
  and sanctions screening, customer screening, amount limits.
- **Risk scoring.** Each transaction is scored on amount, participant
  history, behavior, geography, and velocity. High-risk transactions are
  held or rejected before escrow.
- **Verification steps.** If the template requires SMS or 2FA verification,
  the transaction pauses here until the code is confirmed.

A transaction that fails Verify moves to `FAILED` with a reason. Nothing
was funded, so there is nothing to unwind.

## Phase 2: Fund

**States: `ESCROWED` (and `PENDING_USER_ACTION` while waiting on an external wallet)**

Funds lock into the escrow contract defined by your template. A webhook
fires when escrow confirms on-chain.

What runs here:

- **Escrow funding.** For `coinbax` orchestration, funds lock in the smart
  contract. For `raw`, the direct transfer executes. Either way, the
  on-chain transaction hash is recorded before the state advances.
- **External wallet flows.** When the sender signs from their own wallet,
  the transaction waits in `PENDING_USER_ACTION` until the funding
  transaction lands on-chain.
- **POST_ESCROW controls.** Time delays set the release timestamp; ongoing
  transaction monitoring registers the payment for the escrow period.

The `transaction.escrowed` webhook carries the escrow address and hash, so
your system can reconcile against the chain directly.

## Phase 3: Confirm

**States: `IN_REVIEW`, `DISPUTED`**

Review windows, approvals, and rollback triggers execute. Your integration
can hold, approve, or recall here.

What runs here:

- **Review windows.** RAW transactions hold in `IN_REVIEW` (72 hours by
  default) before completing. Approvals can close the window early.
- **Time delays.** COINBAX transactions wait out the configured delay
  before auto-release. The delay is set by the template's TimeDelay
  control, from one minute up to 30 days.
- **PRE_RELEASE controls.** Final compliance and risk checks run
  immediately before release. A control that fails here blocks the release.
- **Disputes and refunds.** Either party can dispute; the platform can
  refund. Both interrupt the path to settlement while funds are still
  recoverable.

Confirm is the phase that makes stablecoin payments operationally
reversible: funds are committed on-chain but not yet released, so approvals
and recalls still have teeth.

## Phase 4: Settle

**States: `COMPLETED`, `REFUNDED` (plus `RESCINDED` and `FAILED` as the other terminal states)**

The contract releases funds and records the result. Terminal states arrive
by webhook with the full audit trail.

What runs here:

- **Release.** The escrow contract releases funds to the receiver
  (`COMPLETED`) or returns them to the sender (`REFUNDED`).
- **Audit trail.** Every control execution, state transition, and on-chain
  reference is frozen on the transaction record. Terminal states cannot
  transition again.
- **Notifications.** The final webhook (`transaction.completed`,
  `transaction.refunded`, or `transaction.rescinded`) closes the loop for
  your integration.

## State-to-phase map

| Phase | States | Webhook events |
|---|---|---|
| Verify | `PENDING`, `RISK_REVIEW` | `transaction.created`, `transaction.failed` |
| Fund | `PENDING_USER_ACTION`, `ESCROWED` | `transaction.escrowed` |
| Confirm | `IN_REVIEW`, `DISPUTED` | dispute events |
| Settle | `COMPLETED`, `REFUNDED`, `RESCINDED`, `FAILED` | `transaction.completed`, `transaction.refunded`, `transaction.rescinded` |

## Why a framework

The framework is the contract between you and Coinbax. Controls always
execute at a defined phase (PRE_ESCROW controls in Verify, POST_ESCROW in
Fund, PRE_RELEASE in Confirm), states always advance in order, and terminal
states are final. That predictability is what lets you attach approvals,
limits, and recourse to money that otherwise settles instantly.

## Next steps

- [Payment controls](/docs/concepts/controls): the rules that execute in each phase
- [Your first transaction](/docs/getting-started/first-transaction): watch one payment cross all four phases
- [Webhooks](/docs/api/webhooks): receive every phase transition as an event