NOVAPATH / Knowledge APIs
x402 client guide

Connect once.
Pay per result.

  1. Read the OpenAPI schema and select an operation. Free examples and preflight routes help you check coverage.
  2. POST JSON to the operation. The unpaid response is HTTP 402 with a PAYMENT-REQUIRED header containing the exact USDC charge and Bazaar discovery metadata.
  3. Use an x402 v2 client with a Base-compatible wallet to sign the offered exact-payment authorization. Save the original request and the authorization nonce before sending PAYMENT-SIGNATURE. Keep authorization expiry within 10 minutes.
  4. A successful response contains the purchased JSON and PAYMENT-RESPONSE settlement receipt. Keep teacher guidance separate from learner materials.

Recover without paying twice

After a timeout or interrupted response, do not create another payment. POST to /delivery/recover with operation (the original path), input (the exact original JSON), payer, nonce, expires (Unix seconds, at most 5 minutes ahead) and a fresh EIP-191 wallet signature. The signature must be from the payer wallet. Ordinary EVM wallet signatures are verified locally; contract wallet signatures are checked on the payment network.

Compute SHA-256 over canonical JSON {operation,input}, sorting object keys recursively and preserving array order. Sign this exact UTF-8 message, with lowercase payer and nonce and no trailing newline:

NovaPath delivery recovery
Origin: https://instructional-decision-engine-x402.vercel.app
Network: eip155:8453
Payer: 0x…
Nonce: 0x…
Request SHA256: <64 lowercase hex characters>
Expires: <integer Unix seconds>

HTTP 200 returns {recovered:true,charge:false,settlement,result}. A 409 means settlement is not yet confirmed: retry recovery later with a fresh proof. A 404 means no matching delivery receipt was found; contact support if a transaction settled. Invalid proofs return 400/403. Storage or chain outages return 503. The original payment signature is public onchain and is never accepted as a recovery password.

Integration references

Coinbase x402 buyer documentation · Complete operation schemas · Synthetic examples · License and support