{"openapi":"3.1.0","info":{"title":"x402 Base USDC Payment Checker","version":"1.0.0","description":"Pay-per-call x402 tools on Base USDC (eip155:8453, payTo 0x509E55c4F898B43C856Fb0E51048B1b7bFBC9eDE): verify a payment by tx hash (/check $0.01), full funding-history deep scan (/check/deep $0.05), address-poisoning checks (/address/check $0.001, /address/check/full $0.005), and x402 Trust Index lookups (/trust/lookup $0.002). Free: /demo, claims desk (/claim), /trust-index.","x-guidance":"Paycheck verifies Base mainnet USDC payments for x402 buyers and sellers. Paid routes (x402 v2, exact scheme, Base USDC) answer 402 first; retry with the payment header. POST /check {txHash, expectedPayTo?, expectedAmount?} ($0.01): did it settle, right recipient/amount, fake-USDC or lookalike warnings, and who funded the payer. POST /check/deep (same body, $0.05): same plus the payer's full funding history, coverage and a recheckable receipt. POST /address/check {from, to} ($0.001) or /address/check/full ($0.005): address-poisoning check before you send. POST /trust/lookup {url} ($0.002): Trust Index grade + paid-call evidence for an x402 endpoint (free grade-only: GET /trust/lookup?url=). Free: POST /demo (fixture), POST /claim (file evidence you paid but got no/bad response), GET /claims, GET /trust-index.","contact":{"name":"Paycheck (Hustle HQ)","url":"https://paycheck.hectichustle.workers.dev/","email":"hectichustle@mail.grokbot.com"}},"paths":{"/check":{"post":{"summary":"Check a Base USDC payment (paid, $0.01)","x-payment":{"protocol":"x402","scheme":"exact","price":"$0.01","network":"eip155:8453","payTo":"0x509E55c4F898B43C856Fb0E51048B1b7bFBC9eDE"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Provide txHash, or authorization (EIP-3009) when you have no tx hash, or both.","properties":{"txHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","description":"Base mainnet transaction hash"},"expectedPayTo":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Expected recipient (full-address, case-insensitive compare)"},"expectedAmount":{"type":["string","number"],"description":"Expected USDC amount, decimal (e.g. \"0.01\")"},"authorization":{"type":"object","required":["from","nonce"],"description":"Optional EIP-3009 authorization (x402 exact payload) to check when there is no tx or the tx is not found","properties":{"from":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"nonce":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"validBefore":{"type":["string","integer"],"description":"unix seconds"},"validAfter":{"type":["string","integer"]}}},"selfAddresses":{"type":"array","maxItems":10,"items":{"type":"string"},"description":"Optional: other addresses you control; funding from them counts as self_funded"}}}}}},"responses":{"200":{"description":"Check result","content":{"application/json":{"schema":{"type":"object","required":["found","summary","mode","receipt"],"properties":{"found":{"type":"boolean"},"confirmed":{"type":"boolean"},"status":{"type":["string","null"]},"block":{"type":["integer","null"]},"timestamp":{"type":["string","null"]},"confirmations":{"type":"integer"},"payment":{"type":["object","null"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"amount":{"type":"string"}}},"usdcTransfers":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"amount":{"type":"string"}}}},"match":{"type":["object","null"],"properties":{"payToMatch":{"type":["boolean","null"]},"amountMatch":{"type":["boolean","null"]},"ok":{"type":"boolean"}}},"funding":{"type":["object","null"],"properties":{"verdict":{"type":"string","enum":["external","self_funded","unknown"]},"reason":{"type":"string","enum":["no_inbound_in_window","scan_incomplete"],"description":"Only present when verdict=unknown"},"scannedBlocks":{"type":"object","properties":{"from":{"type":"integer"},"to":{"type":"integer"},"complete":{"type":"boolean"}}},"topFunders":{"type":"array"},"payeeFundedPayer":{"type":"boolean"}}},"settlement":{"type":"object","description":"Added field: did the payment settle on-chain?","properties":{"verdict":{"type":"string","enum":["settled","not_settled"]},"reason":{"type":"string","enum":["confirmed_onchain","pending_confirmation","authorization_used","tx_not_found","tx_reverted","no_usdc_transfer","authorization_unused","authorization_unused_or_expired","authorization_unused_pending"]},"note":{"type":"string","description":"For settled: delivery/response by the seller cannot be verified on-chain"}}},"authorization":{"type":"object","description":"Present when authorization was given: {from, nonce, used, chainTime, validBefore, expired}"},"mode":{"type":"string","enum":["live_paid","demo"]},"receipt":{"type":"object","required":["blocksScanned","rpcCalls","priceCharged","verdict","reason"],"properties":{"blocksScanned":{"type":["object","null"],"properties":{"from":{"type":"integer"},"to":{"type":"integer"},"complete":{"type":"boolean"}}},"rpcCalls":{"type":"integer"},"priceCharged":{"type":"string","description":"'0.01 USDC' on /check, '0' on /demo"},"verdict":{"type":["string","null"],"enum":["external","self_funded","unknown",null]},"reason":{"type":["string","null"],"enum":["no_inbound_in_window","scan_incomplete",null]}}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["fake_token","lookalike_address","tx_reverted","no_usdc_transfer"]},"message":{"type":"string"}}}},"summary":{"type":"string"}}}}}},"400":{"description":"Bad input"},"402":{"description":"Payment required (x402 PAYMENT-REQUIRED header)"},"502":{"description":"Upstream RPC failure"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]}}},"/check/deep":{"post":{"summary":"Deep scan: same as /check but reads the payer's full Base USDC funding history (Blockscout index), plus coverage stats and a recheckable sha256 receipt (paid, $0.05; not charged if the index is down)","x-payment":{"protocol":"x402","scheme":"exact","price":"$0.05","network":"eip155:8453","payTo":"0x509E55c4F898B43C856Fb0E51048B1b7bFBC9eDE"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Provide txHash, or authorization (EIP-3009) when you have no tx hash, or both.","properties":{"txHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","description":"Base mainnet transaction hash"},"expectedPayTo":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Expected recipient (full-address, case-insensitive compare)"},"expectedAmount":{"type":["string","number"],"description":"Expected USDC amount, decimal (e.g. \"0.01\")"},"authorization":{"type":"object","required":["from","nonce"],"description":"Optional EIP-3009 authorization (x402 exact payload) to check when there is no tx or the tx is not found","properties":{"from":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"nonce":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"validBefore":{"type":["string","integer"],"description":"unix seconds"},"validAfter":{"type":["string","integer"]}}},"selfAddresses":{"type":"array","maxItems":10,"items":{"type":"string"},"description":"Optional: other addresses you control; funding from them counts as self_funded"}}}}}},"responses":{"200":{"description":"Deep check result: /check fields + coverage + receipt.recheck{payload,hash}","content":{"application/json":{"schema":{"type":"object","required":["found","summary","mode","receipt"],"properties":{"found":{"type":"boolean"},"confirmed":{"type":"boolean"},"status":{"type":["string","null"]},"block":{"type":["integer","null"]},"timestamp":{"type":["string","null"]},"confirmations":{"type":"integer"},"payment":{"type":["object","null"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"amount":{"type":"string"}}},"usdcTransfers":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"amount":{"type":"string"}}}},"match":{"type":["object","null"],"properties":{"payToMatch":{"type":["boolean","null"]},"amountMatch":{"type":["boolean","null"]},"ok":{"type":"boolean"}}},"funding":{"type":["object","null"],"properties":{"verdict":{"type":"string","enum":["external","self_funded","unknown"]},"reason":{"type":"string","enum":["no_inbound_in_window","scan_incomplete"],"description":"Only present when verdict=unknown"},"scannedBlocks":{"type":"object","properties":{"from":{"type":"integer"},"to":{"type":"integer"},"complete":{"type":"boolean"}}},"topFunders":{"type":"array"},"payeeFundedPayer":{"type":"boolean"}}},"settlement":{"type":"object","description":"Added field: did the payment settle on-chain?","properties":{"verdict":{"type":"string","enum":["settled","not_settled"]},"reason":{"type":"string","enum":["confirmed_onchain","pending_confirmation","authorization_used","tx_not_found","tx_reverted","no_usdc_transfer","authorization_unused","authorization_unused_or_expired","authorization_unused_pending"]},"note":{"type":"string","description":"For settled: delivery/response by the seller cannot be verified on-chain"}}},"authorization":{"type":"object","description":"Present when authorization was given: {from, nonce, used, chainTime, validBefore, expired}"},"mode":{"type":"string","enum":["live_paid_deep"]},"receipt":{"type":"object","required":["blocksScanned","rpcCalls","priceCharged","verdict","reason"],"properties":{"blocksScanned":{"type":["object","null"],"properties":{"from":{"type":"integer"},"to":{"type":"integer"},"complete":{"type":"boolean"}}},"rpcCalls":{"type":"integer"},"priceCharged":{"type":"string","description":"'0.01 USDC' on /check, '0' on /demo"},"verdict":{"type":["string","null"],"enum":["external","self_funded","unknown",null]},"reason":{"type":["string","null"],"enum":["no_inbound_in_window","scan_incomplete",null]}}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["fake_token","lookalike_address","tx_reverted","no_usdc_transfer"]},"message":{"type":"string"}}}},"summary":{"type":"string"},"coverage":{"type":["object","null"],"description":"Deep scan coverage stats","properties":{"source":{"type":"string"},"windowBlocks":{"type":"integer"},"windowFrom":{"type":"integer"},"windowTo":{"type":"integer"},"blocksCovered":{"type":"integer"},"coveragePct":{"type":"number"},"complete":{"type":"boolean"},"historyComplete":{"type":"boolean"},"inboundTransfers":{"type":"integer"},"uniqueFunders":{"type":"integer"},"indexer":{"type":"string"},"indexerPages":{"type":"integer"},"indexerMode":{"type":"string"},"rpcCalls":{"type":"integer"},"endpoints":{"type":"array","items":{"type":"string"}}}}}}}}},"400":{"description":"Bad input"},"402":{"description":"Payment required"},"502":{"description":"Upstream RPC failure"},"503":{"description":"Indexer unavailable: not charged, retry later"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.050000"},"protocols":[{"x402":{}}]}}},"/trust/lookup":{"post":{"summary":"Trust Index grade + evidence for an x402 endpoint (paid, $0.002)","x-payment":{"protocol":"x402","scheme":"exact","price":"$0.002","network":"eip155:8453","payTo":"0x509E55c4F898B43C856Fb0E51048B1b7bFBC9eDE"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string"}}}}}},"responses":{"200":{"description":"{url, status: indexed|not_indexed, grade, runDate, run, rawData, evidence{unpaidStatus, priceSeenUSDC, payTo, paymentTxHash, settled, onchain, httpStatusAfterPay, latencyMs, schemaCheck, deliveryResult, payToRotates?, payToRotatesNote?, payToRotatesEvidence?, payToChanged?, payToChange?{previous, current, basis}, payToChangedNote?}, payToRotates?, payToRotatesNote?}. payToRotates: true = the seller hands out a fresh payTo deposit address on every 402 (multi-probe evidence), so evidence.payTo is one sample, not a fixed address. payToChanged: true = the seller's receiving address differs from the previous Trust Index run (Index #3+; grade unaffected; confirm with the seller if you pinned the old address)"},"400":{"description":"Bad url"},"402":{"description":"Payment required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]}},"get":{"summary":"Free: grade + run date only","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{url, status, grade, runDate, run, rawData, payToRotates?, payToRotatesNote?, payToChanged?, payToChangedNote?, claims: {total, disputed, delivered, unrecognizedAddress, payerVerified, list} | null}"},"400":{"description":"Missing/bad url"}},"security":[]}},"/address/check":{"post":{"summary":"Address-poisoning check before sending USDC on Base (paid, $0.001; recent-window / RPC coverage)","x-payment":{"protocol":"x402","scheme":"exact","price":"$0.001","network":"eip155:8453","payTo":"0x509E55c4F898B43C856Fb0E51048B1b7bFBC9eDE"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string","description":"sender"},"to":{"type":"string","description":"intended recipient"}}}}}},"responses":{"200":{"description":"{from, to, risk: low|medium|high, seenBefore, lookalikes[{address, inbound, outbound, dustTransfers, realOut, lastBlock, sampleTx, pattern}], reasons[], coverage{windowBlocks, scannedFrom, scannedTo, coveragePct, complete, transfersSeen, counterparties, rpcCalls}}"},"400":{"description":"Bad input"},"402":{"description":"Payment required"},"502":{"description":"Upstream RPC failure"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001000"},"protocols":[{"x402":{}}]}}},"/address/check/full":{"post":{"summary":"Full-history address-poisoning check (paid, $0.005; one Blockscout index call, up to 2000 transfers; not charged if index down)","x-payment":{"protocol":"x402","scheme":"exact","price":"$0.005","network":"eip155:8453","payTo":"0x509E55c4F898B43C856Fb0E51048B1b7bFBC9eDE"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string","description":"sender"},"to":{"type":"string","description":"intended recipient"}}}}}},"responses":{"200":{"description":"Same shape as /address/check with coverage.source=blockscout, coverage.indexerMode (tokentx|v2), and historyComplete when the call reaches history start"},"400":{"description":"Bad input"},"402":{"description":"Payment required"},"502":{"description":"Upstream RPC failure"},"503":{"description":"Indexer unavailable: not charged, retry later or use /address/check"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}}]}}},"/claim":{"post":{"summary":"Free claims desk: file evidence that you paid an x402 endpoint but got no or bad response (evidence only; no custody or arbitration)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["endpoint"],"properties":{"endpoint":{"type":"string","description":"URL of the x402 resource you paid"},"txHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"authorization":{"type":"object","description":"EIP-3009 {from, nonce, validBefore} if no tx hash"},"httpStatusAfterPay":{"type":["integer","null"],"description":"status you got after paying; null = no response"},"contentDisputed":{"type":"boolean","description":"set true if you got a 2xx but the body was wrong; otherwise a reported 2xx is recorded as delivered"},"observedAt":{"type":"string","description":"ISO 8601"},"note":{"type":"string","maxLength":280},"payerSignature":{"type":"string","description":"Signature by the paying wallet of filer.signMessage (\"x402 claim <claimId>\"): EOA personal_sign (65 bytes) or a deployed smart wallet's ERC-1271 signature (checked with isValidSignature on Base); marks the claim payer-verified"}}}}}},"responses":{"200":{"description":"{claimId, url, status: payment_proven_delivery_disputed|payment_proven_delivered|payment_to_unrecognized_address|payment_not_settled, reasons, evidence{endpoint, payment{txHash, settlement, block, from, to, amount}, buyerReport}, filer{payerVerified, signMessage}, seller{trustIndex (indexed|not_indexed|self_listed), grade, payTo, self?, disclosure?, payToRotates?, recipientMatch? (not_possible_rotating_payTo), indexedPayToSample?, note?}. For a seller that uses per-request deposit addresses (payToRotates) the recipient cannot be matched, so it is never marked payment_to_unrecognized_address and seller.payTo is null (a seller response is verified against the payment recipient), recheck{hash}, nextSteps, limits, stored, firstFiledAt, submissions}"},"400":{"description":"Bad input"},"502":{"description":"Upstream RPC failure"}},"security":[]}},"/claim/{id}":{"get":{"summary":"Free: a stored public claim","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[]}},"/claim/{id}/response":{"post":{"summary":"Free: seller's signed response to a claim. Only the seller can respond: its known payTo (claim.seller.payTo), or the settled payment's recipient if the seller isn't indexed; EOA personal_sign or ERC-1271. Message: \"x402 claim response <id>\\nrespondedAt: <respondedAt>\\n<text>\". One latest response kept; we record it, we do not arbitrate.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text","respondedAt","signature"],"properties":{"text":{"type":"string","maxLength":280},"respondedAt":{"type":"string","description":"Current time, ISO 8601 UTC exactly as toISOString(); within 15 minutes of now and newer than any stored response"},"signature":{"type":"string","description":"0x hex signature of the message by seller.payTo"}}}}}},"responses":{"200":{"description":"Stored"},"400":{"description":"Bad input"},"403":{"description":"Signature does not verify for seller payTo"},"404":{"description":"Claim not found"},"409":{"description":"Seller not indexed (no known payTo) or a newer response exists"}},"security":[]}},"/claims":{"get":{"summary":"Free: list claims, optionally ?endpoint=<url>","parameters":[{"name":"endpoint","in":"query","required":false,"schema":{"type":"string"}}],"security":[]}},"/trust-index":{"get":{"summary":"Free: human-readable x402 Trust Index HTML scorecard (grades never for sale)","security":[]}},"/trust-index/latest.json":{"get":{"summary":"Free: latest Trust Index results","security":[]}},"/trust-index/raw.jsonl":{"get":{"summary":"Free: raw Trust Index rows","security":[]}},"/stats":{"get":{"summary":"Free: aggregate counts of paid /check, /check/deep, /address/check, /address/check/full (verdicts/risk by source; deep + addressFull indexerMode + historyComplete, deep indexerPages buckets; no addresses/txs; /demo excluded)","responses":{"200":{"description":"{note, allTime{since,updatedAt,check,deep,addressCheck,addressFull}, today{day,check,deep,addressCheck,addressFull}}"},"503":{"description":"stats storage not configured"}},"security":[]}},"/demo":{"post":{"summary":"Free demo on a fixed fixture tx (body ignored)","responses":{"200":{"description":"Check result","content":{"application/json":{"schema":{"type":"object","required":["found","summary","mode","receipt"],"properties":{"found":{"type":"boolean"},"confirmed":{"type":"boolean"},"status":{"type":["string","null"]},"block":{"type":["integer","null"]},"timestamp":{"type":["string","null"]},"confirmations":{"type":"integer"},"payment":{"type":["object","null"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"amount":{"type":"string"}}},"usdcTransfers":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"amount":{"type":"string"}}}},"match":{"type":["object","null"],"properties":{"payToMatch":{"type":["boolean","null"]},"amountMatch":{"type":["boolean","null"]},"ok":{"type":"boolean"}}},"funding":{"type":["object","null"],"properties":{"verdict":{"type":"string","enum":["external","self_funded","unknown"]},"reason":{"type":"string","enum":["no_inbound_in_window","scan_incomplete"],"description":"Only present when verdict=unknown"},"scannedBlocks":{"type":"object","properties":{"from":{"type":"integer"},"to":{"type":"integer"},"complete":{"type":"boolean"}}},"topFunders":{"type":"array"},"payeeFundedPayer":{"type":"boolean"}}},"settlement":{"type":"object","description":"Added field: did the payment settle on-chain?","properties":{"verdict":{"type":"string","enum":["settled","not_settled"]},"reason":{"type":"string","enum":["confirmed_onchain","pending_confirmation","authorization_used","tx_not_found","tx_reverted","no_usdc_transfer","authorization_unused","authorization_unused_or_expired","authorization_unused_pending"]},"note":{"type":"string","description":"For settled: delivery/response by the seller cannot be verified on-chain"}}},"authorization":{"type":"object","description":"Present when authorization was given: {from, nonce, used, chainTime, validBefore, expired}"},"mode":{"type":"string","enum":["live_paid","demo"]},"receipt":{"type":"object","required":["blocksScanned","rpcCalls","priceCharged","verdict","reason"],"properties":{"blocksScanned":{"type":["object","null"],"properties":{"from":{"type":"integer"},"to":{"type":"integer"},"complete":{"type":"boolean"}}},"rpcCalls":{"type":"integer"},"priceCharged":{"type":"string","description":"'0.01 USDC' on /check, '0' on /demo"},"verdict":{"type":["string","null"],"enum":["external","self_funded","unknown",null]},"reason":{"type":["string","null"],"enum":["no_inbound_in_window","scan_incomplete",null]}}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["fake_token","lookalike_address","tx_reverted","no_usdc_transfer"]},"message":{"type":"string"}}}},"summary":{"type":"string"}}}}}}},"security":[]}},"/":{"get":{"summary":"Docs + pricing (free)","security":[]}},"/openapi.json":{"get":{"summary":"This document (free)","security":[]}},"/examples":{"get":{"summary":"Free: copy-paste buyer recipes (curl 402 handshake, @x402/fetch client paying /check, verifying a payment to another seller)","responses":{"200":{"description":"Integration guide","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[]}},"/llms.txt":{"get":{"summary":"Free: plain-text guide for agents/LLMs (payment terms, every paid route with price + body, free routes)","responses":{"200":{"description":"llms.txt guide","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[]}},"/.well-known/llms.txt":{"get":{"summary":"Free: same as /llms.txt","responses":{"200":{"description":"llms.txt guide","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[]}},"/.well-known/x402":{"get":{"summary":"Free: x402 discovery manifest (paid resources, prices, payTo)","responses":{"200":{"description":"x402 manifest","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}},"/sitemap.xml":{"get":{"summary":"Free: sitemap of public pages","responses":{"200":{"description":"Sitemap","content":{"application/xml":{"schema":{"type":"string"}}}}},"security":[]}}}}