Workflow
Verify-then-Pay settlement cycle and payment detailed flow.
Control Flow
TessPay enforces deterministic agent payments through a Verify-then-Pay settlement cycle. Execution is verified first; payment is released only as a consequence.
1. Mandate Formulation
When a user issues a task, TessPay generates verifiable mandates aligned with Google AP2. These mandates define scope, conditions, and payment terms. Each mandate is signed and anchored on-chain to ensure immutability and auditability.
The mandate set includes:
Intent Mandate
Captures user intent and constrains the agent’s authority within explicit execution boundaries.
Cart Mandate
Captures the user’s final authorization for a specific cart, including exact items and pricing.
Payment Mandate
Defines payment parameters and contextual constraints required for settlement evaluation.
All mandates are retained as immutable audit artifacts.
2. Authorization and Escrow
Based on the signed mandates, funds are transferred from the user’s wallet into a secure escrow smart contract. The escrow is bound to mandate parameters, including agent address, amount, expiry, and release conditions.
At this stage:
- payment intent is authorized,
- execution authority is delegated,
- funds are locked but not spendable.
3. Execution and Witnessing
The agent executes the authorized task.
During execution, TessPay’s verification services collect cryptographic evidence, including:
- execution telemetry,
- TLSNotary receipts for external API and web interactions,
- TEE attestations for the agent runtime environment.
These artifacts form the raw execution proof set.
4. Verification
Execution proofs are submitted to validators on-chain.
Validators:
- verify receipts and attestations,
- reach Byzantine Fault Tolerant (BFT) consensus,
- aggregate verified proofs into a Proof of Task Execution (PoTE).
The PoTE is anchored on-chain as a non-repudiable execution record.
5. Settlement
The escrow contract validates the submitted PoTE.
- If verification conditions are met, funds are released to the agent’s wallet.
- If verification fails or conditions are unmet, funds are returned to the user.
Settlement is automatic and deterministic.
Payment Settlement Flow
Settlement proceeds through the following steps:
1. Transfer to Escrow
Funds are provisioned into an escrow contract identified by an escrow_id, deployed on the settlement chain. The escrow is bound to the payment mandate and awaits a valid PoTE.
2. Payment Authorization
Settlement is triggered only when the facilitator submits the PoTE Merkle root hash associated with the correct workflow_id and escrow_id. TessPay validates the proof root against accepted proof requirements and policy constraints.
3. Escrow Release
Upon successful validation, the facilitator invokes the escrow contract, which releases funds to the agent wallet as part of an internal transaction.
4. Transaction Finalization
The transaction is finalized on the settlement chain. All related artifacts—including PoTE root hash, telemetry references, mandates, workflow_id, escrow_id, and transaction hash—are recorded as part of the immutable audit trail.
Deterministic Outcome
Execution is verified first. Payment follows as a deterministic consequence, not an assumption.
