# HALOWERK x402werk — Replay Guard

> HALOWERK x402werk — Replay Guard is a paid API for AI agents from x402.netzhandwerker.de, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Detects duplicate/replayed x402 payment authorizations by fingerprinting nonces, payment IDs, and payload hashes within a configurable time window.

## Facts

- Endpoint: POST https://x402.netzhandwerker.de/guard/replay
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/halowerk-x402werk-replay-guard-181e92d3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bBcG_OziCFcHRuWZfzd18

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 halowerk-x402werk-replay-guard-181e92d3 -d '<json body>'
```

Example prompt: Before accepting this x402 payment, check if the nonce 'abc123xyz' and payment ID 'pay_9f8e7d' with payload hash 'sha256_deadbeef' have been seen in the last 3600 seconds — and record this sighting if they haven't been used before.

## When to prefer this

Use this endpoint when building x402-compatible paid APIs on Base Mainnet that need server-side replay protection — specifically when you want a lightweight, pay-per-check external guard that stores SHA-256 fingerprints of nonces/payment IDs/payload hashes without retaining raw values. Prefer this over rolling your own replay store when you want a managed, 24-hour retention window and a simple boolean duplicate recommendation without maintaining your own database.

## Known failure modes

- Missing required fields (nonce, payment_id, or payload_hash absent) returns a validation error
- window_seconds exceeds 86400 returns a parameter error
- Malformed or overly long input strings (beyond 512 chars) rejected
- Payment not made or insufficient USDC balance returns HTTP 402
- Service unavailability or internal errors return 5xx

## How this service works

HALOWERK x402werk — bezahlte Endpunkte nach x402. Preise in USDC auf Base Mainnet.

## Output

Returns whether the submitted combination of nonce, payment ID, and payload hash has been seen within the specified time window, indicating a potential replay attack. If `record` is true, the fingerprints (stored only as SHA-256 hashes) are written for future duplicate checks. Fingerprints are retained for up to 24 hours regardless of the window setting.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "nonce": {
   "type": "string",
   "maxLength": 512,
   "minLength": 1,
   "description": "Nonce of the signed payment authorisation. Stored only as a SHA-256 fingerprint."
  },
  "record": {
   "type": "boolean",
   "default": true,
   "description": "Whether this call is remembered. Set to false to check without writing, so repeated checks of the same payment do not report themselves as duplicates."
  },
  "payment_id": {
   "type": "string",
   "maxLength": 512,
   "minLength": 1,
   "description": "Payment identifier of the x402 payment-identifier extension, or any identifier your client treats as unique per payment. Stored only as a SHA-256 fingerprint."
  },
  "payload_hash": {
   "type": "string",
   "maxLength": 512,
   "minLength": 1,
   "description": "Hash of the request payload that was paid for. Stored only as a SHA-256 fingerprint of the value you send."
  },
  "window_seconds": {
   "type": "integer",
   "default": 3600,
   "maximum": 86400,
   "minimum": 1,
   "description": "How far back a sighting still counts as a duplicate for the recommendation. Fingerprints are kept for 24 hours regardless."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/halowerk-x402werk-replay-guard-181e92d3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.netzhandwerker.de](https://www.zero.xyz/host/x402.netzhandwerker.de/llms.txt)
