{"slug":"api-zfinia-com-x402-v1-x402-challenge-decode-fcc3e1","title":"Decode an x402 payment challenge before paying","host":"api.zfinia.com","method":"POST","resource":"https://api.zfinia.com/x402/v1/x402-challenge-decode","category":"other","description":"Decode an x402 payment challenge before paying: give it the raw 402 body or payment-required header, as JSON or base64, and get back the version, resource, and every accepted payment normalised to scheme, network, asset, amount and payTo. Names what is wrong with named warnings — bad amount, unrecog","price_listed":0.002,"price_asked":0.002,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":2256,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"payload":{"accepts":[{"amount":"2000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","network":"eip155:8453","payTo":"0x25e8245f07d5e4873987293dad666afbe56a9608","scheme":"exact"}],"x402Version":2}},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"payload":{"description":"An x402 payment-required payload: the parsed JSON object, the raw JSON string, or the base64 value of a payment-required header.","oneOf":[{"type":"object"},{"maxLength":16384,"minLength":1,"type":"string"}]}},"required":["payload"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"additionalProperties":false,"properties":{"accepts":{"description":"Accepted payments, normalised. At most 20 are returned.","items":{"additionalProperties":false,"properties":{"amount":{"description":"Price in atomic units of the asset, as declared.","type":["string","null"]},"asset":{"description":"Asset contract address as declared.","type":["string","null"]},"network":{"description":"CAIP-2 network identifier as declared, e.g. \"eip155:8453\".","type":["string","null"]},"pay_to":{"description":"Recipient address as declared.","type":["string","null"]},"scheme":{"description":"Payment scheme as declared, e.g. \"exact\".","type":["string","null"]}},"required":["scheme","network","asset","amount","pay_to"],"type":"object"},"type":"array"},"declared_input":{"description":"Input schema declared under extensions.bazaar.schema.properties.input, or null."},"declared_output":{"description":"Output schema declared under extensions.bazaar.schema.properties.output, or null."},"payment_sent":{"const":false,"description":"Always false. This service never pays anything."},"request_id":{"description":"Delivery request identifier; also returned in x-foundry-request-id.","type":"string"},"resource":{"description":"Declared resource, verbatim, or null."},"service_id":{"description":"Canonical service identifier.","type":"string"},"service_version":{"description":"Version of the invoked service.","type":"string"},"version":{"description":"Declared x402Version, or null when absent or not a number.","type":["integer","null"]},"warnings":{"description":"Deduplicated warning codes describing what is wrong with the challenge.","items":{"type":"string"},"type":"array"}},"required":["request_id","service_id","service_version","version","resource","accepts","warnings","declared_input","declared_output","payment_sent"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-10-02","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":2256,"error":null}],"description_full":"Decode an x402 payment challenge before paying: give it the raw 402 body or payment-required header, as JSON or base64, and get back the version, resource, and every accepted payment normalised to scheme, network, asset, amount and payTo. Names what is wrong with named warnings — bad amount, unrecognised network, invalid payTo, unsupported scheme, missing input or output schema — and returns the declared Bazaar schemas. No network call, no payment sent.","last_updated":"2026-10-02T07:25:37.927Z","schemes":["exact"]}