# x402 Payment Heartbeat / Validation Test

> x402 Payment Heartbeat / Validation Test is a paid API for AI agents from kr-x402-mvp.kgy5612.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-31).

Cheapest end-to-end x402 payment verification on Base USDC ($0.001), returning a payment-confirmed receipt and suggested next endpoints to call.

## Facts

- Endpoint: GET https://kr-x402-mvp.kgy5612.workers.dev/test?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-payment-heartbeat-validation-test-88777b31
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dViLKzk5eGQbNY73alRUw

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 x402-payment-heartbeat-validation-test-88777b31
```

Example prompt: Run a $0.001 x402 payment test to confirm my Base USDC client is working end-to-end, and tag this run with testRunId 'run-001' so I can correlate the receipt.

## When to prefer this

Choose this endpoint when you need the absolute cheapest ($0.001) way to verify an x402 payment client works end-to-end on Base USDC before committing to more expensive paid calls. It is the canonical integration smoke-test for the x402 protocol and doubles as a service-discovery call, returning recommended next endpoints. Prefer it over calling a real data endpoint for testing purposes, as those cost more and produce data you may not need during validation.

## Known failure modes

- Payment not received or insufficient USDC balance — returns 402 Payment Required
- Invalid or missing x402 payment header — returns 402 with payment instructions
- testRunId or echo value exceeds maximum length (100 / 64 chars) — may return 400 Bad Request
- Network or Cloudflare Worker downtime — returns 5xx error
- Malformed query parameters — silently ignored or 400 response

## How this service works

Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.

## Output

A JSON object with: ok (true), paymentVerified (true), receiptId (unique receipt string for the $0.001 USDC payment), testRunId (echoed correlation ID), nextAction (suggested action string), and next_calls (array of recommended paid endpoint paths to call next).

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "echo": {
       "type": "string",
       "examples": [
        "my-agent-1"
       ],
       "maxLength": 64,
       "description": "Optional string echoed back (correlate your test call)"
      },
      "testRunId": {
       "type": "string",
       "examples": [
        "run-001"
       ],
       "maxLength": 100,
       "description": "Optional caller-supplied correlation ID for a bounded validation run (echoed back)"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "t": "2026-10-28T14:00:00Z",
  "ok": true,
  "next": [
   "/crypto/simulate",
   "/crypto/ens",
   "/crypto/liquidations?coin=BTC",
   "/crypto/base-gas"
  ],
  "receiptId": "rcpt_0b9f6c1e2a7d4c55",
  "testRunId": "run-001",
  "nextAction": "call_paid_data",
  "paymentVerified": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-payment-heartbeat-validation-test-88777b31/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from kr-x402-mvp.kgy5612.workers.dev](https://www.zero.xyz/host/kr-x402-mvp.kgy5612.workers.dev/llms.txt)
