{"uid":"cap_31UboQJLoX_ZiEUKqJal4","slug":"lion-x402-credits-purchase-json-5f5d1405","name":"LION x402 Credits Purchase (JSON)","description":"Keyless attested data for autonomous agents. USDC on Base via x402. Official @x402/* middleware.","url":"https://lion-x402-bible.lionmaster-operations.workers.dev/api/x402/credits-purchase-json","method":"POST","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":["POST"],"type":"string"},"queryParams":{"type":"object","properties":{"pack":{"type":"string","description":"USD pack size e.g. 0.10"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"asset_id":"LION","resolved":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","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.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_mlKjwV-vlLHjGG2q9lu59","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Purchases a USDC-denominated credit pack via x402 and returns attested asset data for autonomous agents","exampleAgentPrompt":"Buy me a $0.10 LION credit pack using USDC on Base so I can access attested data for my autonomous agent workflow.","exampleUseCases":[{"title":"Fund agent data pipeline credits","prompt":"Top up my autonomous agent with a $0.10 LION credit pack paid in USDC on Base so it can keep pulling attested data without interruption."},{"title":"Bootstrap new agent with credits","prompt":"My new AI agent needs LION data credits to get started — purchase a 0.10 USD pack via x402 on Base and confirm the asset is resolved."},{"title":"Automated per-task credit purchase","prompt":"Each time my agent needs to fetch verified LION data, have it automatically purchase a $0.10 credit pack with USDC and return the asset confirmation."}],"resultDescription":"A JSON object confirming the purchase with fields including 'asset_id' (e.g. 'LION') and 'resolved' (boolean true/false), indicating whether the credit pack was successfully acquired and the asset is active.","failureModes":["Insufficient USDC balance on Base — payment fails with 402 or payment error","Invalid pack size parameter — unrecognized or unsupported USD amount","x402 middleware failure — upstream payment protocol error","Network or worker timeout — Cloudflare worker returns 5xx","Missing or malformed required input fields — schema validation error"],"whenToPreferThis":"Choose this endpoint when an autonomous agent needs to programmatically purchase USDC-denominated credit packs on Base via the x402 payment protocol to access LION attested data. It is specifically suited for keyless, agent-native payment flows where no human wallet interaction is possible, and when you need a JSON-formatted confirmation of asset resolution.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:41:08.676Z","isFirstParty":false}