{"uid":"cap_kTngL2KYiDeNZ8b2mNB5c","slug":"tenjin-x402-content-api-security-invariant-article-800b38ac","name":"Tenjin – x402 Content API Security Invariant Article","description":"A security invariant for any x402-gated content API that also lets already-paid buyers re-download: never fork one handler's security posture on the Accept header. Separate the 402-issuing payment surface from the 401/403 entitlement surface, or you invite double-charges and paywall leaks. As-of 2026-07-13.","url":"https://tenjin.blog/api/read/athoughts/x402-content-apis-keep-the-402-payment-route-and-the-authed-download-route-as-se","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"],"type":"string"},"pathParams":{"type":"object","required":["handle","slug"],"properties":{"slug":{"type":"string","description":"The article's URL slug, unique per creator. The reserved slug `latest` resolves to the creator's newest published piece; its stable scheduled-read form is the wallet-address URL /api/read/<0x-address>/latest (a handle `latest` is not payable)."},"handle":{"type":"string","description":"The creator's handle, or their wallet address. The address form is REQUIRED for a durable `latest` alias (a handle `latest` is not payable), and is the only form for an unclaimed creator."}}},"queryParams":{"type":"object","required":[],"properties":{},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.12","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.12/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.12","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.12","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_JYXDFfWgry6-gqzG0Tl2O","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.12","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches a paid article on Tenjin explaining the security principle of keeping 402 payment routes and 401/403 authenticated download routes separate for x402-gated content APIs.","exampleAgentPrompt":"Fetch the Tenjin article on keeping x402 payment routes separate from authenticated download routes — the one about security invariants for x402-gated content APIs written by the creator 'athoughts'.","exampleUseCases":[{"title":"Research x402 API security design","prompt":"Pull up the Tenjin piece by athoughts about why you should never mix the 402 payment handler with the 401/403 auth handler in x402-gated content APIs — I'm designing a paywalled API and want to understand the security invariant."},{"title":"Learn about preventing double-charges","prompt":"I want to read that Tenjin article about how blending payment and entitlement routes in x402 APIs can cause double-charges and paywall leaks — it's by athoughts, the slug is about x402-content-apis-keep-the-402-payment-route-and-the-authed-download-route-as-se."},{"title":"Study re-download architecture for paid content","prompt":"Get me the athoughts article on Tenjin that covers how already-paid buyers can re-download x402-gated content without being charged again, and why that requires separate routing surfaces."}],"resultDescription":"The full text content of the Tenjin article discussing the security invariant for x402-gated content APIs, specifically covering why the 402-issuing payment surface must be kept separate from the 401/403 entitlement/download surface to prevent double-charges and paywall leaks, including guidance on re-download flows for already-paid buyers.","failureModes":["402 Payment Required if no valid payment is provided — caller must submit a valid x402 USDC micropayment of $0.12 before content is served","404 Not Found if the handle 'athoughts' or slug does not resolve to a published article","401/403 if a returning buyer's entitlement token is missing or expired for re-download flow","Slug mismatch causing incorrect article resolution if slug is truncated or malformed"],"whenToPreferThis":"Use this endpoint when you specifically need to read the Tenjin article on x402 content API security architecture, particularly the invariant about separating payment and entitlement routes. Prefer this over generic web search when you want the authoritative, paywalled technical analysis from the Tenjin platform delivered directly as structured content.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:55:59.250Z","isFirstParty":false}