# Delx Commerce — X402 Payment Payload Size Calculator

> Delx Commerce — X402 Payment Payload Size Calculator is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Computes the byte size of an X402 payment payload and checks whether it falls within a specified byte budget.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/x402-payment-payload-size?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-x402-payment-payload-size-calculator-cbe6e327
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ow5Y4Vlm9Z63czqYejSoy

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 delx-commerce-x402-payment-payload-size-calculator-cbe6e327 -d '<json body>'
```

Example prompt: Can you check if my x402 payment payload fits within 512 bytes? Here's the payload object: {"network":"base","amount":"0.001","recipient":"0xabc123"}.

## When to prefer this

Use this endpoint when you need to programmatically verify that an x402 payment payload object fits within a byte budget before transmission, especially in agent workflows where payload size constraints are enforced by the receiving protocol or infrastructure. Prefer this over manual serialization checks when you need a verifiable, auditable result with an input hash for proof of integrity.

## Known failure modes

- Payload exceeds maxProperties limit of 128 — request rejected
- maximum_bytes not provided — within_budget check may not be meaningful
- Malformed payload object — parsing error returned
- Network or server error — non-200 response with no result body

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object with the payload's byte count, a boolean indicating whether it's within the specified budget, the schema version, a SHA256 hash of the input for auditability, a flag confirming no data is retained, and the number of external calls made (always 0).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "payload": {
   "type": "object",
   "description": "Payload supplied to X402 Payment Payload Size; used only for this bounded calculation and processed in memory without retention.",
   "maxProperties": 128,
   "additionalProperties": true
  },
  "maximum_bytes": {
   "type": "integer",
   "description": "Maximum Bytes supplied to X402 Payment Payload Size; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "bytes": 31,
   "within_budget": true
  },
  "schema": "delx/util-x402-payment-payload-size/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "4590ed598201943e731e542786ac6275109501a7a8d678408f346290dd7f31d4",
   "external_calls": 0
  },
  "operation": "delivery_contract:x402_payment_payload_size"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-x402-payment-payload-size-calculator-cbe6e327/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
