{"name":"Hilt Pay API sample payment-to-access flow","version":"2026-06-15","canonical_url":"https://www.hilt.so/v1/sample-flow","summary":"A public example showing how a product can use Hilt Pay API to protect an API endpoint with HTTP 402, Solana USDC payment, receipt, entitlement, and webhook state.","audience":["developers","AI agents","API products","bots","paid software teams"],"current_live_scope":{"hilt_pay_api_namespace":"/v1/access","settlement":"Solana USDC","protocol_shape":"HTTP 402 Payment Required with a Hilt-created x402 payment requirement","subscription_mode":"Buyer-approved native Solana USDC subscriptions for recurring access"},"steps":[{"id":"discover","title":"Discover the public contract","description":"Read Hilt's LLM files, agent manifest, catalog, OpenAPI, SDK docs, and examples to choose Workspace or API.","links":["https://www.hilt.so/llms.txt","https://www.hilt.so/v1/catalog","https://docs.hilt.so/developers/access"]},{"id":"setup","title":"Prepare the Hilt Pay API setup","description":"Create a setup intent, submit an app and product manifest, and route the owner through approval before live key use.","links":["https://www.hilt.so/developers/agent-setup","https://docs.hilt.so/developers/agent-setup"]},{"id":"protect","title":"Check entitlement before serving","description":"Before serving the protected endpoint, call POST /v1/access/entitlements/check and serve content only when Hilt returns has_access: true.","links":["https://docs.hilt.so/developers/access","https://docs.hilt.so/developers/examples"]},{"id":"require_payment","title":"Return HTTP 402 when unpaid","description":"If access is missing, return a Hilt-created x402 payment requirement that describes the price and payment session for the protected resource.","links":["https://www.hilt.so/x402","https://www.hilt.so/articles/http-402-payment-required-api"]},{"id":"settle_and_activate","title":"Verify payment and activate access","description":"Hilt verifies Solana USDC payment, issues a receipt, activates the entitlement, records support and audit state, and emits webhooks.","links":["https://docs.hilt.so/developers/webhooks","https://docs.hilt.so/merchant/payments-receipts"]},{"id":"retry","title":"Retry the protected resource","description":"The user or agent retries the protected endpoint. The backend checks Hilt entitlement again and serves the resource only after access is active.","links":["https://docs.hilt.so/developers/examples"]}],"safe_boundaries":["Do not serve protected content from a wallet signature, transaction hash, or client claim alone.","Do not put Hilt API keys in browser code.","Do not claim Base, EVM, or USDT live settlement unless public Hilt docs announce availability.","Do not describe x402 as a chain, token, wallet, or settlement path."]}