x402 pre-payment decision playbook

Validate the HTTP 402 payment challenge for Coinbase Bazaar publishers

The endpoint must fail closed with structured payment metadata before payment. This playbook maps the decision to observable Ontario evidence so an agent can fail closed before payment.

Validate HTTP 402 Bazaar teams No-payment first
Decision question: Can Coinbase Bazaar publishers rely on this x402 endpoint without listed services that are payable but not agent-readable?

Only after Coinbase Bazaar publishers can inspect 402 status, PAYMENT-REQUIRED header shape, accepted requirements, and retry expectations. If the evidence is missing, stale, or contradictory, the agent should fail closed.

Required evidence

  • Confirm the endpoint maps to a real payment resource for service teams preparing x402 metadata before marketplace discovery.
  • Require 402 status, PAYMENT-REQUIRED header shape, accepted requirements, and retry expectations.
  • Reject when there is 200 before payment, missing PAYMENT-REQUIRED header, malformed accepts entries, or unclear resource metadata.
  • Link the final decision to a public report, manifest, benchmark row, or policy outcome.

Reject conditions

Reject or send to human review when there is 200 before payment, missing PAYMENT-REQUIRED header, malformed accepts entries, or unclear resource metadata.

Do not let a positive-looking badge or directory row override a stale or contradictory live check.

Agent workflow

  1. Start with the no-payment evidence path.
  2. Run the Ontario verifier or policy endpoint shown below.
  3. Compare live endpoint behavior against manifest and discovery metadata.
  4. Store the report_id or policy decision with the agent's payment log.
  5. Send the payment only when the agent's own policy allows it.

Command or probe

curl -i https://example.com/api/paid-endpoint
# Expect HTTP 402 plus parseable payment challenge metadata before signing.

Primary Ontario surface: /api/verify/x402-readiness

Sourceability note

Search Console showed early impressions for /answers/http-402-payment-validator.

KPI: more listed services with fresh readiness reports.

Trust boundary

Ontario Protocol provides readiness and trust signals based on observable endpoint behavior, manifest metadata, payment challenge behavior, report history, and public evidence. It does not guarantee endpoint safety, service quality, financial outcome, or future behavior.

Read the HTTP 402 validator answer Run verifier Browse discovery Read trust boundary