{"uid":"cap_DPnjE7drmnWysIHejEJFd","slug":"agent-transaction-trust-x402-authorization-2f51f3b0","name":"Agent Transaction Trust - x402 Authorization","description":"Authorize an AI-agent payment under a predelegated spending policy before funds move. Verify that the merchant's exact x402 challenge, amount, payer, payee and HTTP request are within authority already delegated to the agent. No synchronous human approval is required when the predelegated policy permits the purchase. Includes signed authorization plus post-payment on-chain settlement verification and receipt; this is not merchant reputation scoring.","url":"https://json-repair-api-9ybv.onrender.com/trust/x402/authorize?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"nonce":{"type":"string"},"payer":{"type":"string","description":"EVM address that would sign/pay the merchant transaction."},"request":{"type":"object","required":["method","url"],"properties":{"url":{"type":"string"},"body":{},"method":{"type":"string"}},"description":"Exact HTTP request the agent intends to make after authorization."},"category":{"type":"string","description":"Purchase category used by the operator policy."},"merchant_id":{"type":"string","description":"Stable merchant identifier used by the operator policy."},"ap2_evidence":{"type":"object","description":"Optional AP2 v0.2 mandate evidence and challenge token for native verification."},"policy_token":{"type":"string","description":"Operator-issued signed policy credential for the buying agent."},"payment_required":{"oneOf":[{"type":"object"},{"type":"string"}],"description":"The merchant's real x402 PAYMENT-REQUIRED payload, as decoded JSON or its encoded string."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__MsUYkqlAyybgAzWoPC6Q","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates and authorizes an autonomous agent's x402 merchant payment challenge against an operator-issued policy before the transaction is allowed to proceed.","exampleAgentPrompt":"Before my agent pays this merchant, check the x402 PAYMENT-REQUIRED payload against my operator policy token — the payer address is 0xABC123, merchant ID is 'merchant-42', and the purchase category is 'software-subscription'.","exampleUseCases":[{"title":"Gating an agent fleet's purchases","prompt":"My autonomous purchasing agent just received an x402 challenge from a SaaS vendor — run a trust check against our operator policy before it signs anything; the payer is 0xDEADBEEF, merchant ID is 'saas-vendor-7', category is 'software', and here's the payment-required payload from the merchant."},{"title":"Policy compliance before marketplace payment","prompt":"Before my agent buys a dataset from the marketplace, verify the x402 merchant challenge against my operator policy credential — payer address 0x1234ABCD, merchant ID 'data-marketplace-1', category 'data-purchase', and the PAYMENT-REQUIRED object from the merchant response."},{"title":"Operator mandate check for DeFi agent","prompt":"My DeFi agent is about to pay for a price-feed subscription and got a PAYMENT-REQUIRED x402 header — check this challenge against our signed policy token to make sure it's within the allowed categories; payer is 0x9876CAFE, merchant is 'pricefeed-oracle', category is 'oracle-subscription'."}],"resultDescription":"Returns an authorization decision indicating whether the agent's intended payment satisfies the operator-issued policy. On success, the trust check confirms the x402 merchant challenge is valid and the transaction is approved; on failure, it returns a denial with policy violation details. The $0.001 USDC fee only settles upon a successful authorization handler response.","failureModes":["Invalid or expired policy token — returns authorization denied with policy validation error","Merchant ID not recognized or not covered by policy — returns policy mismatch error","Purchase category not permitted under the operator mandate — returns category denial","Malformed x402 payment-required payload — returns parsing or schema validation error","Payer EVM address does not match the policy credential — returns identity mismatch error","Network timeout or upstream handler failure — payment does not settle, request may be retried","Invalid nonce or replay detected — returns nonce validation failure"],"whenToPreferThis":"Use this endpoint when an autonomous agent needs to validate an incoming x402 PAYMENT-REQUIRED merchant challenge against an operator-issued policy credential before committing funds. It is specifically designed for the x402 protocol flow where the payment settles only on successful authorization, making it suitable for agentic purchase gating, spend-policy enforcement, and multi-agent fleet spend controls. Prefer this over generic auth endpoints when you need policy-token-based authorization tightly integrated with x402 merchant challenge verification.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T18:30:47.141Z","isFirstParty":false,"canonicalSlug":"agent-transaction-trust-x402-authorization-2f51f3b0"}