← Back to Gateway

PAY-AND-RETRY DEMO

Test the payment loop end to end.

This demo requests a 402 quote, then shows the payment model we want in production: x402 with Base USDC as the payment currency, Alumni Gateway as the accounting layer, and Base settlement as the payment rail. The retry step carries the tx hash, quote ID, and request fingerprint in x-alumni-payment.

REQUEST

Premium structured retrieval from the ALUMNI docs.

Selected route

/api/agents/docs-excerpts

Quoted amount

0.001 USDC

Your wallet signs the payment locally. No private key reaches ALUMNI or Cloudflare.

AGENT RESPONSE

idle

Flow

  1. 1. Agent requests a quote from the selected paid route.
  2. 2. Wallet signs the current proof transaction locally.
  3. 3. The tx hash, quote ID, and request fingerprint are replayed in the payment header.
  4. 4. The route re-verifies the payment and returns the structured result.
Request a quote to inspect the 402 response.

EXACT CONTRACT SHAPE

{
  "error": "payment_required",
  "quoteId": "...",
  "route": "/api/agents/docs-excerpts",
  "paymentProtocol": "x402",
  "paymentCurrency": "USDC on Base",
  "paymentNetwork": {
    "name": "Base",
    "chainId": 8453,
    "symbol": "USDC",
    "contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bD02913"
  },
  "settlementChain": {
    "name": "Base",
    "chainId": 8453,
    "symbol": "USDC"
  },
  "payTo": "0x6A02a2E71A236a06f50cAD68220966C36F54498D",
  "paymentHeader": "x-alumni-payment",
  "requestFingerprint": "..."
}

PHASE ALIGNMENT

Phase 1: discovery and catalog

Phase 2: live monetized products

Phase 3: pay-and-retry demo

Phase 4: settlement hardening