Skip to article
Browse documentation +
TREASURY / ELPIS

Payments

The full payment lifecycle: propose, escrow, execute, verify — and how to undo one.

Lifecycle

StateMeans
DETECTEDThe intent exists. No money committed.
EVALUATEDAll controls have run and produced facts.
STAGEDHeld in on-chain escrow; cancellable until the window closes.
APPROVAL_REQUIREDHeld for a person. Reasons name the control that asked.
BLOCKEDA blocking rule refused it. Terminal.
EXECUTINGThe transaction has been submitted.
EXECUTEDThe transaction is mined; verification is next.
VERIFIEDThe chain was read back and confirms the transfer.
FINALIZEDComplete. Irreversible from here.
CANCELLEDRecalled inside the window; escrow refunded on chain.
ROLLED_BACKExecution failed and was unwound.
COMPENSATEDMade whole by a compensating action.
FAILEDErrored; no funds moved.

Proposing

POST /api/v1/actions
{
  "accountId": "acc_vendors",
  "amount": "1250.00",
  "address": "0x…",
  "label": "Acme Hosting",
  "documentRef": "INV-1042",
  "obligationId": "obl_…",
  "reference": "invoice-1042"
}
  • amount is a decimal string. Base units are what the chain uses; the API accepts both.
  • reference or an idempotency-key header makes retries safe.
  • documentRef is required above the document anchor threshold.
  • Passing a known counterparty’s address links the payment to its trust history.

Undoing a payment

SituationActionEffect
Staged, inside the windowCancelEscrow refunded on chain; daily budget restored.
Staged, window closed—It is now settling; only a compensating action is possible.
Approval pendingRejectTerminal refusal; no money ever moved.
Executed but revertedAutomaticRecorded as a refusal, never as a payment.
Finalized wronglyCompensateA new action pays it back; the original stays in the ledger.
Cancelling is not a database update. It is a real on-chain refund, verified like any other transaction — which is why the window is the guarantee, not a promise.

Idempotency

A retry of the same intent must never be a second payment. Elpis derives a key when one is not supplied (from the pool, recipient, amount and window) and refuses duplicates with 409. The key is what makes an agent safe to retry.

Verification

After execution, Elpis reads the chain independently. Only a confirmed transfer becomes VERIFIED and then FINALIZED. A missing or null hash is treated as pending, never as success. See Verifiability. For a job that outlives a single payment and settles in milestones, see Settle on proof.