x402 pre-payment decision playbook
Run agent can-pay preflight for paid API providers
The agent needs an allow, review, or deny decision before wallet spend. This playbook maps the decision to observable Ontario evidence so an agent can fail closed before payment.
Run can-pay preflight
API providers
No-payment first
Decision question:
Can paid API providers rely on this x402 endpoint without agents abandoning endpoints because proof is missing?
Only after paid API providers can inspect target URL, max price, network, report freshness, and policy outcome. 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 API teams turning paid endpoints into verifiable agent infrastructure.
- Require target URL, max price, network, report freshness, and policy outcome.
- Reject when there is policy deny, stale readiness evidence, unsupported network, or price above the agent limit.
- 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 policy deny, stale readiness evidence, unsupported network, or price above the agent limit.
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 -X POST https://ontarioprotocol.com/api/agent/can-pay \
-H "Content-Type: application/json" \
-d '{"target_url":"https://example.com/api/paid-endpoint","max_price_usdc":"0.05"}'
Primary Ontario surface: /api/agent/can-pay
Sourceability note
Search Console showed early impressions for /answers/agent-payment-firewall.
KPI: more verification runs and service listing submissions.
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.