Public API

Headless settlement evidence for agents.

api.settleproof.xyz has a visual console at the root and JSON endpoints under /v1/*. Agents use the API to prepare deterministic escrow inputs, inspect registered merchants, bind delivery proof templates, build audit evidence packets, relay fully signed transactions, and read live devnet settlement state without opening the demo UI.

Hosted surfaces

URLAudiencePurpose
api.settleproof.xyzhumansAPI console with endpoint inventory and live protocol status
/openapi.jsonagents + SDKsOpenAPI 3.1 contract for generated clients and API review
/v1/statusagentsJSON status for deployed programs, relay, indexer, and reads
/v1/registry/merchantsagents + merchantsmerchant attestor registry with settlement stats
/v1/proof-templatesintegratorsdelivery proof templates for API, travel, tickets, and commerce
demo.settleproof.xyzhumans + merchantsvisual merchant/x402 harness that uses the same protocol path

Endpoint map

MethodPathStatusUse
GET/openapi.jsonliveOpenAPI 3.1 contract
GET/v1/statusliveProtocol and deployment status
POST/v1/escrows/prepareliveDerive escrow PDA, vault ATA, merchant PDA, and task hash inputs
GET/v1/escrows/:pdaliveRead one escrow account from devnet
GET/v1/evidence/:pdaliveBuild a liability evidence packet with digest/signature metadata
GET/v1/merchants/:pubkeyliveRead one registered merchant account from devnet
GET/v1/registry/merchantsliveList/filter registered merchants, attestor keys, and settlement stats
GET/v1/proof-templatesliveList reusable delivery proof templates, API/data first
GET/v1/indexerliveList escrow accounts from the persistent devnet index
GET/v1/indexer/eventsliveList persisted settlement events
POST/v1/indexer/syncliveTrigger a program-account sync into the persistent index
GET/v1/relayliveDescribe signed-transaction relay policy
POST/v1/relayliveBroadcast a base64 serialized, already-signed Solana transaction

Prepare an escrow

/v1/escrows/prepare does not create an escrow. It prepares deterministic addresses and input bytes. The agent still signs locally with its wallet or posts an already-signed transaction to /v1/relay.

curl -s https://api.settleproof.xyz/v1/escrows/prepare \
  -H 'content-type: application/json' \
  -d '{
    "agent_owner": "<agent wallet>",
    "merchant": "<merchant wallet>",
    "mint": "<USDC or mock mint>",
    "amount_stroops": "1000000",
    "ttl_seconds": 3600,
    "task_intent": "GET https://merchant.example/api/report?id=abc"
  }'
{
  "data": {
    "escrow_pda": "...",
    "vault_token_account": "...",
    "agent_token_account": "...",
    "merchant_pda": "...",
    "inputs": {
      "task_hash": "...",
      "task_hash_derived": true,
      "amount_usdc": "1.000000"
    },
    "sdk_call": {
      "package": "@aap/sdk-ts",
      "method": "client.createEscrow",
      "signer": "agent_owner"
    }
  }
}

Headless agent flow

import { SettleProofApiClient, hexToBytes } from "@aap/sdk-ts";

const api = new SettleProofApiClient();
const quote = await api.prepareEscrow(intent);

const { escrowPda } = await client.createEscrow({
  agentOwner,
  merchantPubkey,
  mint,
  amountStroops,
  taskHash: hexToBytes(quote.data.inputs.task_hash),
  ttlSeconds,
});

// Optional: broadcast an already-signed transaction through the public relay.
await api.relaySignedTransaction({
  signed_transaction: signedTxBase64,
  encoding: "base64",
  confirm: true,
});

const merchants = await api.listMerchants({ status: "Active", q: "api" });
const templates = await api.listProofTemplates();
const evidence = await api.getEvidence(escrowPda.toBase58());

Registry, templates, evidence

These endpoints are the competitive layer above raw payment rails: agents can choose registered merchants, bind the task to a delivery template, and later export an evidence packet that shows whether the merchant delivered or the refund path remained enforceable.

curl -s 'https://api.settleproof.xyz/v1/registry/merchants?status=Active&q=api&min_reputation=5000'
curl -s 'https://api.settleproof.xyz/v1/proof-templates?wedge=api-data'
curl -s 'https://api.settleproof.xyz/v1/evidence/<escrow_pda>?download=json'
{
  "data": {
    "version": "settleproof-evidence-v1",
    "purpose": "audit packet proving post-payment delivery settlement state",
    "delivery_claim": {
      "proof_hash": "...",
      "verification": "Ed25519 attestation from registered merchant key"
    },
    "settlement_decision": {
      "status": "released | refunded | pending",
      "reason": "merchant_delivery_proof_verified"
    }
  },
  "signature": {
    "status": "signed | unsigned",
    "digest_sha256": "...",
    "algorithm": "ed25519"
  }
}

Relay policy

No private keys

The public API never receives agent, merchant, or attestor secrets. POST /v1/relay only accepts serialized transactions that have already been signed by the caller.
curl -s https://api.settleproof.xyz/v1/relay

curl -s https://api.settleproof.xyz/v1/relay \
  -H 'content-type: application/json' \
  -d '{
    "signed_transaction": "<base64 serialized signed tx>",
    "encoding": "base64",
    "confirm": true
  }'

Indexer filters

The current hosted indexer syncs live program accounts from Solana devnet into a persistent JSON store. Set INDEXER_STORE_PATH to a Railway volume path if you want the index to survive redeploys.

curl -s 'https://api.settleproof.xyz/v1/indexer?limit=10'
curl -s 'https://api.settleproof.xyz/v1/indexer?merchant=<merchant>&state=Pending'
curl -s 'https://api.settleproof.xyz/v1/indexer/events?limit=10'
curl -s -X POST 'https://api.settleproof.xyz/v1/indexer/sync'