{"uid":"cap_7GmTE4ueNwQPihe3YNrpe","slug":"tenjin-ship-a-paid-api-with-x402-94cb17c4","name":"Tenjin: Ship a Paid API with x402","description":"Ship a paid API with x402: monetize an endpoint or proxy an upstream API, charged per call. As of 2026-08-10. Based on the x402 (Coinbase) protocol and the @x402/next / @x402/express middleware. Payments are stablecoin (USDC-style) on an EVM chain such as Base. Symbol names track the current SDK; the flow is stable. HTTP 402 turned into a working pay-per-request rail: an unpaid request gets a 402 challenge quoting a price and a pay-to address; the client signs a stablecoin authorization and retries with a payment header; a facilitator verifies the signature and funds, your handler runs","url":"https://tenjin.blog/api/read/0xe4c16d163d80fd972e6e1e9b94bc71c5fbe5a9c5/ship-a-paid-api-with-x402-monetize-an-endpoint-or-proxy-an-upstream-api-charged","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.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_LR1igFnWHQZFIkfPUbY7R","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches a Tenjin article about building pay-per-call APIs using the x402 protocol, requiring a $0.40 USDC micropayment per read","exampleAgentPrompt":"Pull up the Tenjin article about shipping a paid API with x402 — the one by wallet address 0xe4c16d163d80fd972e6e1e9b94bc71c5fbe5a9c5 with slug 'ship-a-paid-api-with-x402-monetize-an-endpoint-or-proxy-an-upstream-api-charged'.","exampleUseCases":[{"title":"Learning x402 API monetization","prompt":"Fetch the Tenjin guide on how to monetize an API endpoint using x402 — the article at creator address 0xe4c16d163d80fd972e6e1e9b94bc71c5fbe5a9c5 with slug ship-a-paid-api-with-x402-monetize-an-endpoint-or-proxy-an-upstream-api-charged. I want to understand how pay-per-call billing works with stablecoins."},{"title":"Researching x402 middleware options","prompt":"I'm building a SaaS API and want to add per-call USDC billing. Grab the Tenjin article on x402 by the creator at 0xe4c16d163d80fd972e6e1e9b94bc71c5fbe5a9c5 about shipping paid APIs — I want to see how the @x402/next and @x402/express middleware work."},{"title":"Exploring HTTP 402 payment flow","prompt":"Can you read me the Tenjin piece about using HTTP 402 as a real payment rail — from creator 0xe4c16d163d80fd972e6e1e9b94bc71c5fbe5a9c5, slug ship-a-paid-api-with-x402-monetize-an-endpoint-or-proxy-an-upstream-api-charged? I need to understand how the challenge-response flow and facilitator verification work."}],"resultDescription":"The full text or structured content of a Tenjin article explaining how to implement x402 pay-per-call APIs, including details on the HTTP 402 challenge-response flow, stablecoin USDC payments on EVM chains like Base, and usage of @x402/next and @x402/express middleware. The response is gated behind a $0.40 USDC micropayment.","failureModes":["402 Payment Required if no valid x402 payment header is included","Invalid or expired payment signature returns 402 or 401","Unknown slug or handle returns 404","Facilitator unavailable may cause payment verification to fail with 5xx","The reserved slug 'latest' with a handle (not wallet address) is not payable and will fail"],"whenToPreferThis":"Choose this endpoint when you specifically need implementation guidance on the x402 pay-per-call protocol for APIs, including stablecoin micropayments on EVM chains. It is ideal for developers wanting to monetize their own APIs or proxy upstream APIs using Coinbase's x402 middleware for Next.js or Express. Prefer this over generic Web3 documentation when you want a self-contained, paid-access article format with working code-level guidance.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:52:41.122Z","isFirstParty":false}