Hilt Pay API
Hilt Pay API lets software turn a stablecoin payment into an access decision. Use it when an API, AI tool, bot, dataset, software feature, private product, or paid agent needs:- a payment session
- an x402
402 Payment Requiredresponse - Solana USDC settlement
- a receipt and proof trail
- an entitlement check
- webhook events
- subscription state for recurring access
- support context that can be fetched through the API
/v1/access.
This is the Hilt surface for paid API access and agentic payments: a protected resource can return a payment requirement, the buyer or agent can complete payment, and your backend can serve only after Hilt entitlement state is active.
Current public scope
Hilt Pay API is live with Solana USDC settlement. x402 is the protected-resource protocol shape for API and agent flows. Treat it as the HTTP402 Payment Required contract your resource can return when access is missing. The live public settlement rail is Solana USDC; create live sessions only from rails returned as available by Hilt for that product and account.
Additional settlement rails will have their own setup docs when they are publicly available.
Route overview
Use the/v1/access namespace for Hilt Pay API objects:
How the protected-resource flow works
For durable or time-based access, callPOST /v1/access/entitlements/check and serve only when Hilt returns has_access: true.
For metered requests:
- Your product receives a request with a stable request id.
- Your backend atomically consumes one unit with
POST /v1/access/entitlements/consume. - If usage is missing, create a payment session and return HTTP
402with Hilt’sPAYMENT-REQUIREDheader. - The buyer or buyer-agent pays the Solana USDC terms and retries your resource with
PAYMENT-SIGNATURE. - Your backend settles the signature through
POST /v1/access/x402/settle. - Hilt verifies settlement, records the receipt, activates entitlement state, and returns
PAYMENT-RESPONSE. - Your backend atomically consumes one unit with the same logical request id.
- Serve only after settlement and consumption succeed.
Create an app
Configure Solana USDC settlement
Create a product
Check setup readiness
Check durable access state
has_access is false, return HTTP 402 with the payment requirement or checkout handoff your flow supports.
For metered agent requests, the runtime authority is POST /v1/access/entitlements/consume. Entitlement checks are useful for display and planning; atomic consumption decides whether each billable request is served. Do not replace either server-side decision with a wallet signature, transaction hash, or client-side claim.
Create a payment session
payment_session.idpayment_session.statuspayment_session.checkout_urlwhen the flow uses hosted checkoutpayment_session.payment_requirementwhen the flow is protocol-basedpending_entitlementrailpayment_session_options
checkout_url for hosted Solana USDC checkout handoff. Use payment_requirement only when the response includes a protocol requirement for your protected-resource flow.
Return and settle x402 V2
For an x402 session, Hilt returns the standard V2 payment requirement and its encodedPAYMENT-REQUIRED header. Relay that header with HTTP 402 Payment Required.
The selected acceptance names Solana mainnet, native USDC, the gross amount, the merchant recipient, and the Hilt payment scheme. When a platform fee applies, scheme: hilt-exact includes two direct USDC transfer legs in extra.hilt.atomicTransfers. The buyer signs one Solana transaction. The merchant payment and Hilt fee either settle together or neither settles; Hilt does not receive or forward the merchant portion.
The buyer or agent retries with a base64-encoded x402 V2 PAYMENT-SIGNATURE header. Send that header and the Hilt payment-session ID to:
PAYMENT-RESPONSE header.
Do not serve from a signed payload alone. Serve only after settlement succeeds and the entitlement check or usage consumption succeeds.
Consume metered usage
Metered products grant a fixed number of units per successful payment. Consume units atomically before serving:Idempotency-Key for each billable operation. Concurrent requests cannot consume the same final unit twice. When no units remain, return a fresh Hilt 402 challenge rather than serving the resource.
For a complete route pattern, see Agent-to-agent micropayments.
Submit proof when your flow needs it
has_access becomes true.
Native subscriptions
Hilt Pay API supports recurring products through native Solana subscription setup. For the complete merchant and API guide, see Native subscriptions. Use this for:- paid APIs
- AI tools with monthly access
- subscription datasets
- recurring bot access
- private software subscriptions
- paid communities that need automatic access periods
Native subscription quickstart
- Create a recurring product with
billing_model: "recurring",renewal_mode: "solana_native_subscription",billing_interval_days, andcancel_at_period_end. - Start a payment session for that product with
rail: "solana_usdc". - Send the buyer to the returned
checkout_url, or return the protocol requirement if your product is using the protected-resource path and Hilt returned one. - After the buyer signs and the first payment succeeds, check access with
POST /v1/access/entitlements/check. - Store the Hilt identifiers you need for support: entitlement id, payment id, receipt id, and native subscription authorization id when present in the Hilt response or webhook payload.
- Drive your own access decision from Hilt entitlement state, not from a wallet signature alone.
- the buyer or merchant can stop future collection
- access can remain active until the paid-through date
- Hilt records cancellation and subscription state
- your product reads the entitlement state through the same access check
immediate_revoke is false, access can remain valid until the current paid-through date. Keep using entitlement checks to decide what the buyer can access.
Webhooks
Sandbox sessions
Use sandbox sessions to test the integration without live money.- denied access
- pending access
- allowed access
- webhook consumer testing
- repeated SDK and Postman checks
Agent setup
Agents can prepare the setup before the owner approves live use.- app
- product
- billing model
- protected resource
- webhook destination
- settlement rail
- owner approval handoff
Pricing
Hilt Pay API has separate pricing from Hilt Pay Workspace:
Open Hilt Pay API pricing for the current plans, comparison table, and fee estimator.

