{"uid":"cap_ow5Y4Vlm9Z63czqYejSoy","slug":"delx-commerce-x402-payment-payload-size-calculator-cbe6e327","name":"Delx Commerce — X402 Payment Payload Size Calculator","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/x402-payment-payload-size?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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."}}},"responseSchema":{"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"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_OQt3ukVn8jjVcAXZReTQp","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the byte size of an X402 payment payload and checks whether it falls within a specified byte budget.","exampleAgentPrompt":"Can you check if my x402 payment payload fits within 512 bytes? Here's the payload object: {\"network\":\"base\",\"amount\":\"0.001\",\"recipient\":\"0xabc123\"}.","exampleUseCases":[{"title":"Pre-flight payload size check","prompt":"Before I send this x402 payment, can you measure how many bytes the payload is and tell me if it's within my 256-byte budget? Payload: {\"network\":\"base\",\"amount\":\"0.001\",\"recipient\":\"0xDeAdBeEf\",\"memo\":\"agent-pay\"}."},{"title":"Debugging oversized x402 payload","prompt":"My x402 payment keeps getting rejected — can you compute exactly how large this payload object is in bytes so I can figure out what to trim? Maximum allowed is 128 bytes."},{"title":"Validating payload budget before agent workflow","prompt":"I'm building an automated agent that sends x402 micropayments and need to confirm my standard payload template is under 200 bytes — can you check this for me?"}],"resultDescription":"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).","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:54:06.681Z","isFirstParty":false,"canonicalSlug":"delx-commerce-x402-payment-payload-size-calculator-cbe6e327"}