{"uid":"cap_JiHOM27ze30J2IGSn2-bM","slug":"browser-agent-x402-paywall-mid-session-decision-procedure-155c1464","name":"Browser Agent x402 Paywall Mid-Session Decision Procedure","description":"Paid agent-facing brief on Browser agent crossing an x402 paywall mid-session: decision procedure for a web/browser agent that hits a 402 Payment Required gate on a page it was already scraping or acting in. Covers pay-vs-skip classification for page-level gates, avoiding double-pay loops on repeated loads, receipt binding to the delivered content, post-payment page state handling, and session/cookie continuity after settlement.-0. Blunt decision procedure, not marketing.","url":"https://k2so.wrong.systems/api/services/browser-agent-crossing-an-x402-paywall-mid-sessi","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","properties":{"meta":{"enum":["0","1"],"type":"string","description":"Set to 1 for free metadata JSON (no payment required)"},"topic":{"type":"string","description":"Optional topic override for the decision procedure"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","title":"Browser agent crossing an x402 paywall mid-session: decision procedure paid response","$schema":"https://json-schema.org/draft/2020-12/schema","required":["ok","paid","service","provider","result"],"properties":{"ok":{"type":"boolean"},"paid":{"type":"boolean"},"result":{"type":"object","required":["ok","service"],"properties":{"ok":{"type":"boolean","description":"Handler success"},"brief":{"type":"string","description":"Decision procedure prose for agents"},"model":{"type":"string"},"topic":{"type":"string"},"service":{"type":"string","description":"Service slug"},"procedure":{"type":"string"},"generatedAt":{"type":"string","description":"ISO-8601 timestamp"},"generationSource":{"enum":["llm","reasoning","deterministic"],"type":"string"}}},"payment":{"type":"object","properties":{"code":{"type":"string"},"payer":{"type":"string"},"detail":{"type":"string"},"selfPay":{"type":"boolean"},"transaction":{"type":"string"}}},"service":{"type":"string"},"provider":{"type":"string","const":"K-2SO"}}}}}}},"responseSchema":{"type":"json","example":{"ok":true,"paid":true,"result":{"ok":true,"brief":"plain prose decision procedure (120+ words)","model":"deepseek/deepseek-v4-flash-0731","topic":"string topic","service":"browser-agent-crossing-an-x402-paywall-mid-sessi","procedure":"same as brief","generatedAt":"2026-01-01T00:00:00.000Z","generationSource":"deterministic"},"service":"browser-agent-crossing-an-x402-paywall-mid-sessi","provider":"K-2SO"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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":"down","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_28q2OxPZaHTiCAwRitU_n","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a paid decision-procedure brief for browser/web agents that encounter a 402 Payment Required gate on a page they are already scraping or acting in","exampleAgentPrompt":"Give me the blunt decision procedure for handling an x402 402 paywall my browser agent just hit mid-scrape — I need to know how to classify pay-vs-skip, avoid double-pay loops, bind the receipt to the content, and keep my session cookies intact after settlement.","exampleUseCases":[{"title":"Mid-scrape paywall classification for crawler","prompt":"My web crawler just hit a 402 Payment Required wall halfway through scraping a site — give me the decision procedure for whether to pay or skip this gate, and how to avoid accidentally paying twice if the page reloads."},{"title":"Receipt binding after agent payment","prompt":"My browser agent paid an x402 paywall but I need to know the correct way to bind the payment receipt to the content it unlocked — what's the procedure so I can verify the payment actually corresponds to what was delivered?"},{"title":"Session continuity after x402 settlement","prompt":"After my agent settles an x402 payment mid-session, how should it handle the page state and cookies to make sure the session continues cleanly without breaking the scraping flow or triggering another payment prompt?"}],"resultDescription":"A structured JSON response containing a prose decision-procedure brief covering: pay-vs-skip classification for page-level 402 gates, double-pay loop avoidance on repeated page loads, receipt-to-content binding after payment, post-payment page state handling, and session/cookie continuity after x402 settlement. Also includes metadata such as the service slug, generation timestamp, generation source, and payment confirmation details.","failureModes":["Payment not completed — returns unpaid 402 response requiring x402 payment before content is delivered","Invalid method — only GET/HEAD/DELETE accepted; other methods rejected","Topic override not recognized — falls back to default topic","Service temporarily unavailable — upstream LLM or reasoning engine failure returns error in result.ok=false","Double-payment scenario — agent retries payment after already settling, potentially wasting funds if not handled"],"whenToPreferThis":"Choose this endpoint when building or debugging a browser or web-scraping agent that needs concrete, actionable guidance on handling x402 payment gates encountered mid-session — specifically when you need decision logic for pay-vs-skip, double-pay prevention, receipt binding, and session continuity. Prefer this over general x402 documentation when you want a blunt, agent-optimized procedure rather than marketing material, and when the $0.002 cost is acceptable for reliable, generated decision guidance.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T11:26:19.163Z","isFirstParty":false}