{"uid":"cap_h98sbrplQVaeaz356s09w","slug":"gw8-signal-api-should-i-pay-decision-a18e63c6","name":"GW8 Signal API – Should-I-Pay Decision","description":"[Payment decision: spend policy + seller reputation risk check, one verdict] Right before an AI agent pays: POST {payment, policy, seller} -> ONE verdict pay / dont_pay / ask_human. Runs the spend-policy check (limits, rolling cap, categories, allow/deny, hours, assets/chains, approval threshold) and the x402 seller reputation check (buyers, wash share, age, concentration), with reasons and one signed receipt. Stateless; never pays anyone. No charge if seller data is down. $0.02 USDC.","url":"https://micro-saas-agent.onrender.com/api/pay/should-i-pay?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"policy":{"type":"object","example":{"currency":"USDC","perTxLimit":"1","rollingCap":{"limit":"10","spentSoFar":"2.40"},"allowedAssets":["USDC"],"allowedChains":["base"],"requireApprovalAbove":"0.50"}},"seller":{"type":"object","example":{"address":"0x1111111111111111111111111111111111111111"}},"payment":{"type":"object","example":{"chain":"base","amount":"0.05","agentId":"research-agent-1","currency":"USDC","timestamp":"2026-10-21T15:30:00Z","recipientId":"0x1111111111111111111111111111111111111111","merchantCategory":"data-api"}},"sellerRules":{"type":"object","example":{"onCaution":"ask_human","onUnknown":"ask_human"}}}},"responseSchema":{"type":"json","example":{"spend":{"decision":"allow"},"engine":"gw8-should-i-pay/1","seller":{"score":58,"verdict":"caution"},"reasons":[{"action":"ask_human","detail":"seller verdict caution (score 58) -> ask_human","source":"seller_reputation"}],"verdict":"ask_human","decisionReceipt":{"alg":"Ed25519","query":{"verdict":"ask_human","sellerScore":58,"requestSha256":"…","sellerVerdict":"caution","spendDecision":"allow"},"signed":true,"endpoint":"POST /api/pay/should-i-pay","accessType":"PAY_DECISION","verify_url":"https://micro-saas-agent.onrender.com/api/receipt/verify"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_67Zk66vIquDdzy_GxoBs2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Combines spend-policy enforcement and x402 seller reputation into a single pay/ask_human/deny verdict for an AI agent contemplating a micropayment","exampleAgentPrompt":"Before I pay this x402 data API at address 0x1111...1111 for 0.05 USDC on Base, check whether it fits my policy — $1 per-tx limit, $10 rolling cap with $2.40 already spent, USDC only — and tell me if the seller is trustworthy or if I should ask a human first.","exampleUseCases":[{"title":"Autonomous research agent payment gate","prompt":"My research agent is about to pay 0.05 USDC on Base to seller 0x1111111111111111111111111111111111111111 for a data API call. My policy caps each transaction at $1 and the rolling 24h cap is $10 with $2.40 spent so far. Check the seller's reputation and tell me if it's safe to auto-pay or if I should hold for human approval."},{"title":"Budget guardrail for multi-agent fleet","prompt":"I'm running a fleet of agents that each have a $0.50 per-call limit and a $5 daily rolling cap. Before agent 'pricing-agent-7' pays a crypto market data endpoint at 0x2222222222222222222222222222222222222222 for 0.02 USDC on Base, run a should-I-pay check so I know if the spend is in policy and the seller has a good reputation."},{"title":"Human-in-the-loop payment approval flow","prompt":"My agent wants to pay an x402 seller at 0x3333333333333333333333333333333333333333 for 0.30 USDC on Base — that's above my $0.25 auto-approve threshold. Run a should-I-pay check with my policy and tell me the seller score so I can decide whether to approve this manually."}],"resultDescription":"Returns a JSON object with: a spend decision (allow/deny), a seller reputation score (0-100) and verdict (safe/caution/danger), an overall verdict (allow/ask_human/deny), a reasons array explaining each factor, and a signed Ed25519 decision receipt with a verify URL — giving the agent everything needed to act or escalate.","failureModes":["Missing or malformed policy object returns validation error, no charge","Unknown seller address returns unknown verdict with ask_human escalation per sellerRules","Rolling cap already exceeded returns deny verdict","Network timeout or server error on Render returns no charge (settle-after-data guarantee)","Invalid chain or currency not in allowedAssets/allowedChains returns policy denial","Malformed payment timestamp causes request rejection"],"whenToPreferThis":"Choose this endpoint when an AI agent needs a single, combined verdict that covers both spend-policy compliance and x402 seller trustworthiness before committing a USDC micropayment on Base. It is especially valuable for autonomous agents that must auto-pay or escalate to a human without separate calls for policy and reputation. Prefer it over building custom spend-policy logic when you want signed, auditable receipts and no charge on failure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:40:51.246Z","isFirstParty":false,"canonicalSlug":"gw8-signal-api-should-i-pay-decision-a18e63c6"}