TrustBench Receipts API

Public, immutable Routing Receipt envelopes addressable by ULID. No auth required.

GitHub OpenAPI

Operations 2

GET /receipts/{id} Fetch a public, immutable Routing Receipt envelope #
POST /verify Verify that an x402 payment settled on-chain and the receipt signature is valid #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/trustbench-io:trustbench-io-receipts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

trustbench-io-receipts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TrustBench Receipts API
  version: 0.1.0
  summary: Non-custodial routing and audit layer for x402 with Ed25519-signed receipts.
  description: TrustBench is a non-custodial routing and audit layer for x402. Every paid POST /route call emits an Ed25519-signed receipt covering the routing decision and the on-chain settlement reference, verifiable offline against a published public key with no dependency on TrustBench being online or honest. Hard spend caps, idempotency keys, and a fail-safe paywall (refuses to charge when the upstream merchant is non-conformant) are bundled in. Agents sign their own EIP-3009 transferWithAuthorization with their own wallet; TrustBench constructs the quote, routes to a probed and scored provider, observes the on-chain settlement, and emits the signed receipt.
  x-guidance: 'TrustBench is a routing layer that wraps third-party x402 endpoints with signed receipts. Agents pay POST /route via the x402 paywall (per-call USDC settlement on Base through the Coinbase CDP facilitator). The 402 challenge advertises the price; on success the response includes an Ed25519-signed RoutingReceipt envelope retrievable forever at GET /receipts/{id}. Verify receipts offline with @trustbench/verify-receipt (npm) against the public key at /.well-known/trustbench-pubkey. Canonical discovery surfaces: /openapi.json (this file), /.well-known/trustbench.json (machine manifest), /skill.md (agentic.market format), /llms.txt (llmstxt.org format).'
  contact:
    name: TrustBench
    url: https://trustbench.io
    x-twitter: https://x.com/TrustBench
    x-github: https://github.com/lithvall/TrustBench
  license:
    name: MIT
    url: https://github.com/lithvall/TrustBench/blob/main/LICENSE
servers:
- url: https://trustbench.io
  description: Production
tags:
- name: Receipts
  description: Public, immutable Routing Receipt envelopes addressable by ULID. No auth required.
paths:
  /receipts/{id}:
    get:
      tags:
      - Receipts
      summary: Fetch a public, immutable Routing Receipt envelope
      description: 'Public, no-auth endpoint. Returns the byte-exact signed envelope used by @trustbench/verify-receipt. Content-negotiated: Accept: text/html returns the rendered HTML view; any other Accept returns canonical JSON. The ULID acts as audit token; receipts are immutable, cache-friendly (public, max-age=86400, immutable).'
      parameters:
      - in: path
        name: id
        required: true
        description: 'Receipt ULID: rcpt_<26> (Phase 3 settlement receipts) or rrcpt_<26> (Phase 4 routing receipts).'
        schema:
          type: string
          pattern: ^r?rcpt_[0-9A-Z]{26}$
      responses:
        '200':
          description: Signed receipt envelope.
          content:
            application/json:
              schema:
                type: object
                description: Canonical signed receipt. Schema is documented in receipt-spec-v1.md; verify with @trustbench/verify-receipt or scripts/verify-receipt.js.
                externalDocs:
                  url: https://github.com/lithvall/TrustBench/blob/main/receipt-spec-v1.md
            text/html:
              schema:
                type: string
        '404':
          description: No receipt found for this ULID.
      operationId: getReceiptsById
      x-operation-id-source: derived
  /verify:
    post:
      tags:
      - Receipts
      summary: Verify that an x402 payment settled on-chain and the receipt signature is valid
      description: 'Public, no-auth receipt verification endpoint. Two modes: (1) Lookup — pass receipt_id to fetch and verify a TrustBench-issued receipt. (2) Offline — pass receipt_json (the full {receipt, signature} envelope) to verify against the published Ed25519 public key without database lookup. Returns signature_valid (boolean) and on_chain_verified (boolean) with detail objects on failure. Use this as the verify-after-pay step in any agent workflow that calls an x402 provider.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                receipt_id:
                  type: string
                  pattern: ^r?rcpt_[0-9A-Z]{26}$
                  description: 'Lookup mode: receipt ULID to fetch and verify. Mutually exclusive with receipt_json.'
                receipt_json:
                  type: object
                  description: 'Offline mode: the full {receipt, signature} envelope to verify directly. Mutually exclusive with receipt_id.'
      responses:
        '200':
          description: Verification result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  receipt_id:
                    type: string
                  mode:
                    type: string
                    enum:
                    - lookup
                    - offline
                  signature_valid:
                    type: boolean
                    description: true if Ed25519 signature matches canonical receipt bytes.
                  on_chain_verified:
                    type: boolean
                    description: true if tx_hash exists on Base, payer/payee/amount match, and tx succeeded.
                  signature_detail:
                    type: object
                    nullable: true
                    description: Present when signature_valid is false. Contains kind and reason.
                  chain_detail:
                    type: object
                    nullable: true
                    description: Present when on_chain_verified is false. Contains kind and reason.
                  signature_alg:
                    type: string
                    const: ed25519
                  verify_url:
                    type: string
                    description: Human-readable receipt page (lookup mode only).
                  pubkey_url:
                    type: string
                    description: Published Ed25519 public key URL.
        '400':
          description: Missing or invalid input (no receipt_id or receipt_json, or both provided).
        '404':
          description: No receipt found for the given ID (lookup mode).
      operationId: postVerify
      x-operation-id-source: derived
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: tb_live_<argon2id-key>
      description: Server-side API key. Used as the auth fallback on POST /route when the x402 paywall is disabled, and for POST /route/settle.
externalDocs:
  description: Methodology, receipt spec, and machine-readable manifest
  url: https://trustbench.io/methodology
x-trustbench:
  phase: phase-4
  manifest: https://trustbench.io/.well-known/trustbench.json
  skill: https://trustbench.io/skill.md
  llmsTxt: https://trustbench.io/llms.txt
  publicKey: https://trustbench.io/.well-known/trustbench-pubkey
  receiptSpec: https://github.com/lithvall/TrustBench/blob/main/receipt-spec-v1.md
  verifierNpm: https://www.npmjs.com/package/@trustbench/verify-receipt
  custody: non-custodial
  networks:
  - base
  settlementAssets:
  - USDC
  note: Discovery layer v0.1 — minimal-viable OpenAPI 3.1. AgentCash-conformant `x-payment-info` per-operation pricing annotations are planned for the post-Strata sprint (target week of 2026-06-02). Canonical pricing and 402-challenge behavior are the source of truth in the interim.