Agent setup
Agent setup is the Hilt Pay API path for software that wants to configure paid access without asking the merchant to click through every technical step. Use it when an AI agent, Cursor workflow, internal platform agent, developer tool, or integration bot needs to:- create a sandbox setup intent
- propose the app, product, protected resource, webhook, and settlement rail
- test the denied -> 402 -> payment -> proof -> entitlement loop in sandbox
- hand live approval back to the owner
- receive scoped live credentials only after owner approval
The safe mental model
| Step | Agent can do | Owner controls |
|---|---|---|
| Discover | Read docs, OpenAPI, SDKs, Postman, and llms.txt | n/a |
| Bootstrap | Create a sandbox setup intent | n/a |
| Manifest | Propose app, product, webhook, protected resource, protocol, and settlement rail | Review the proposed live configuration |
| Sandbox | Create sandbox products/sessions and check entitlements | n/a |
| Approval | Poll status and receive the approved shape | Approve live access, billing, live key scopes, payout wallet, and rail settings |
| Runtime | Create sessions, return x402 requirements, check entitlements, receive webhooks | Revoke keys, pause products, disable rails, change billing, and inspect audit/support history |
Current public launch posture
Hilt Pay API launches with:solana_usdcas the live settlement rail- x402 as the HTTP
402 Payment Requiredprotected-resource protocol - API pricing through Sandbox, Starter, Growth, Scale, and Enterprise
- public SDKs on npm and PyPI
- public GitHub developer assets, OpenAPI, and Postman
1. Create a setup intent
setup_intent_id- one-time
setup_token - sandbox API key
- owner approval URL
- expiry
- allowed sandbox actions
2. Submit a setup manifest
The manifest is the agent’s proposed plan. It should be explicit enough for the owner and Hilt to understand what will be created.expected_monthly_volume_minor_units, expected_monthly_volume_usd, expected_monthly_payments, expected_monthly_webhook_events, and expected_monthly_entitlement_checks when the agent supplies them. It compares Starter, Growth, and Scale using the API subscription price plus Solana USDC transaction fees. If the agent does not know volume yet, Hilt defaults the recommendation to Starter and asks for better assumptions instead of forcing the owner to guess.
3. Poll setup status
4. Owner approval
The owner opens the approval URL from a first-party Hilt session. The approval page is the trust handoff between the agent and the account owner. It shows the agent, requested permissions, product, price, protected resource, protocol, settlement rail, blockers, warnings, and the recommended API plan. The owner should only need to approve the intent, subscribe to the right API tier if needed, and confirm payout rail settings. They should not have to recreate the setup the agent already prepared. Approval can issue scoped live access for the owner’s workspace, but it does not bypass:- API billing plan checks
- payout wallet setup
- rail health and production gates
- live-mode confirmation
- webhook signing secret handling
- emergency disable controls
5. Configure rail settings
The agent can configure the proposed live rail through the API once it has owner-approved credentials:6. Create app and product
Idempotency-Key on every write.
7. Check readiness and available rails
payment_session_options.session_creatable_rails[] to a buyer or agent. allowed_rails[] is policy; it is not proof that a rail is ready to appear in checkout.
8. Runtime protected-resource loop
The application should behave like this:- Agent or user requests a protected resource.
- Your server calls
POST /v1/access/entitlements/check. - If
has_access: true, serve the resource. - If not paid, create a payment session with
POST /v1/access/payment-sessions. - Return HTTP
402 Payment Requiredwithpayment_protocol: "x402"andsettlement_rail: "solana_usdc". - The agent or buyer pays through the provided requirement.
- Hilt verifies settlement, creates receipt state, activates entitlement, and emits webhooks.
- The agent retries the resource.
9. Billing checkout for Hilt Pay API
Account owners can create a Stripe Checkout session for Hilt Pay API billing:Agent rules
Agents should:- keep Hilt keys server-side only
- use sandbox setup first
- include idempotency keys
- deny access unless
has_access: true - treat x402 as protocol and Solana USDC as launch settlement rail
- use webhooks for post-payment automation
- keep Hilt ids and external ids in the app database
- show owner approval and billing steps clearly
- embed Hilt keys in browser code
- treat sandbox credentials as live credentials
- show blocked rails as buyer options
- claim Base/EVM/USDT are live unless the public docs say so
- grant access from a pending payment session
- treat webhook delivery alone as enough to serve protected work without an entitlement check

