x402 pre-payment decision playbook
Validate the HTTP 402 payment challenge for x402 facilitator integrators
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
facilitators
No-payment first
Decision question:
Can x402 facilitator integrators rely on this x402 endpoint without network, asset, or settlement metadata drift?
Only after x402 facilitator integrators 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 teams connecting verify and settle flows to facilitator infrastructure.
- 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
- Start with the no-payment evidence path.
- Run the Ontario verifier or policy endpoint shown below.
- Compare live endpoint behavior against manifest and discovery metadata.
- Store the report_id or policy decision with the agent's payment log.
- 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 x402 challenge and network metadata validations.
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.