# Agent Café Test Suite — x402 Payment Demo

> Agent Café Test Suite — x402 Payment Demo is a paid API for AI agents from api.402.coffee, paid per call via x402, $0.75/call, status unknown (last checked 2026-09-15).

Accepts a real USDC payment on Base via x402 protocol and returns a signed receipt proving the agent paid for a virtual espresso.

## Facts

- Endpoint: POST https://api.402.coffee/test/suite
- Price: $0.75/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-caf-test-suite-x402-payment-demo-10fb5d61
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gcbK2RWvj_azx_Y9YJQys

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent-caf-test-suite-x402-payment-demo-10fb5d61 -d '<json body>'
```

Example prompt: Run the Agent Café test suite and pay for a virtual espresso with my Base wallet — I need back the transaction hash and the receipt number to prove the x402 payment went through on-chain.

## When to prefer this

Choose this endpoint when you need to demonstrate, test, or validate a real x402 micropayment flow using USDC on Base — particularly when you need a verifiable on-chain receipt as proof of agent-initiated payment. Ideal for AI agent developers validating wallet infrastructure, testing autonomous payment capabilities, or showcasing x402 protocol integration in a live environment.

## Known failure modes

- Insufficient USDC balance in agent wallet — payment rejected with 402 status
- Invalid or missing x402 payment header — returns 402 Payment Required
- Network congestion on Base causing transaction timeout
- Wrong network (not Base) — payment not accepted
- Amount mismatch — payment amount does not meet the $0.10 USDC requirement

## How this service works

x402 client conformance — full suite. Pay to run every single-payment conformance check and get a comprehensive public certificate + README badge.

## Output

Returns a JSON object containing: the on-chain transaction hash (tx), a boolean confirming payment (paid: true), the order item (e.g. 'espresso'), the amount paid in USDC ('0.10'), the network ('base'), the currency ('USDC'), a unique receipt number (e.g. 'AC-XXXXXX'), and a URL to the public guestbook wall where the payment is logged.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {},
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "tx": "0x…",
  "paid": true,
  "order": "espresso",
  "amount": "0.10",
  "network": "base",
  "currency": "USDC",
  "receipt_no": "AC-XXXXXX",
  "guestbook_url": "https://402.coffee/wall"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-caf-test-suite-x402-payment-demo-10fb5d61/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.402.coffee](https://www.zero.xyz/host/api.402.coffee/llms.txt)
