ERGO
Back to demos
Gateway demo

x402 Accord Gateway

A 402-style payment challenge that turns a paid request into an Accord Agreement, Verification Receipt and Settlement Receipt.

Status

Prototype

Prototype

x402 proves payment intent. Accord adds the work contract around it: what was requested, how completion is verified, and how settlement is recorded.

Flow

What happens

  1. 1Client requests a protected API route.
  2. 2Gateway returns a 402-style challenge with an Accord Agreement template.
  3. 3Agent satisfies the payment requirement in mock or testnet mode.
  4. 4Gateway executes the task and records the verifier decision.
  5. 5Accord emits verification and settlement receipts for audit.

Receipt shape

Fields to inspect

agreementId
payer
provider
workHash
paymentProof
verificationStatus
settlementReference

Run modes

Mock

Available first

Runs without keys, funds or external settlement. Best for UX and integration tests.

Testnet

Next

Adds Ergo testnet settlement references after the rail is wired and documented.

Safety rules

No production mainnet claim.

Payment proof and work proof are separate fields.

Gateway must refuse settlement if verification fails.

Prototype event stream

What becomes live

Replace static prototype events with signed gateway receipts emitted by the runnable Accord demo.

agreement.createdsettlement.recorded

API preview

Open JSON
curl https://www.ergoblockchain.org/api/agent-economy/events

This endpoint is prototype telemetry. It is intentionally separate from live usage counters until demos emit signed receipts.

Expected JSON

Demo output shape

No mainnet
{
  "agreementId": "acc_402_demo_001",
  "payment": { "scheme": "x402", "status": "satisfied" },
  "verification": { "status": "accepted", "workHash": "blake2b256:..." },
  "settlement": { "rail": "mock", "status": "recorded" }
}