Start
Sandbox vs live
Two kinds of workspace#
| Sandbox | Live | |
|---|---|---|
| Money | Simulated sUSDC on CortexPay's ledger | USDC on Elysium or HyperEVM |
| Settlement | Never broadcast; references start with sim_ | On-chain transfer, verified by transaction hash |
| Signatures | Real EIP-712 signatures from a sandbox signer | The owner approves and signs each payment in their own wallet |
| API keys | cpk_test_… | cpk_live_… |
| Labels in the app | Simulated badges on every balance and payment | No simulated badges |
| Status on this deployment | Available | Enabled |
Sandbox#
- Sandbox agents hold simulated sUSDC. Owners top them up from the agent page; nothing leaves the ledger.
- Sandbox services are real x402 endpoints served by this deployment at
/x402/sandbox/:slug. They return a genuine402with aPAYMENT-REQUIREDheader and verify the EIP-712 signature you send back. - Seeded demonstration history is labelled “Seeded demo history” in the app and flagged
seeded: truein the API. - A guest sandbox (no wallet) is removed seven days after it was created. Connecting a wallet keeps it.
Live#
A live workspace pays real USDC on Elysium or HyperEVM from the workspace owner's wallet. Agents propose payments and the policy checks them, but every live payment then waits for the owner, who approves it and signs it in their wallet: CortexPay holds no key and never holds funds. The provider settles the payment with its x402 facilitator; no public facilitator lists these chains, so CortexPay runs one providers can use (see CortexPay's facilitator).
- The agent requests a service with the same API as in the sandbox.
- CortexPay reads the provider's 402, quotes it and runs the ten policy checks, reading the owner's USDC balance on chain. A payment that fails a check is refused here.
- Because the money is the owner's, a payment that passes waits for approval (
requires_approval): it shows in Approvals, in notifications and as anapproval.requestedwebhook. - The owner clicks Approve and sign in the wallet they signed in with. The wallet shows the exact authorization: amount, recipient and time window. Elysium USDC is paid through Permit2, so a payment there may first ask for a Permit2 approval of exactly that amount (gas in HYPE).
- CortexPay checks the signature, sends the paid request and marks the payment delivered only after it finds the transfer on chain.
- Only the wallet the money comes from can approve and sign. Any owner or admin can reject.
- If the provider's signing window runs out before the owner signs, approving again issues a fresh authorization, for as long as the approval request is open (60 minutes).
- Autonomous live payments, from agent accounts with an on-chain policy co-signer, are not available: those contracts are not deployed, and will not be before an independent security review.
Networks#
| Network | CAIP-2 | Settlement | Payment assets |
|---|---|---|---|
| CortexPay Sandbox | eip155:31337 | Simulated | sUSDC (eip3009) |
| Elysium | eip155:99901 | On-chain | USDC (permit2) |
| Elysium Testnet | eip155:99801 | On-chain | None verified |
| HyperEVM | eip155:999 | On-chain | USDC (eip3009, permit2) |
| HyperEVM Testnet | eip155:998 | On-chain | None verified |
The details of each network's payment method are on x402 payment flow.
Infrastructure credits#
Credits pay CortexPay's own fees. They are not money: they cannot be withdrawn, transferred or paid to a provider, and service prices are always paid in the stablecoin the service asks for. The default prices:
| Action | Credits | Notes |
|---|---|---|
| Payment authorized | 1 | Refunded when the payment never settles (refused, failed, expired or cancelled). |
| Agent registered | 10 | Charged once. |
| AI question, AI report, policy suggestion | 5 / 20 / 5 | Configured prices; not charged yet. |
| Starting balance | 1000 sandbox · 100 live | Granted when a workspace is created. |
The prices in force are returned by GET /api/credits/balance as costs. Sandbox workspaces can top up for free (+500, at most five times in 24 hours, up to 5,000).
import { CortexPay } from "@cortexpay/sdk";
const cortex = new CortexPay({ apiKey: process.env.CORTEXPAY_API_KEY!, baseUrl: "https://cortexpay.vercel.app" });
const credits = await cortex.credits.balance();
console.log(credits.balance, credits.costs);- GET
/api/credits/balanceCredit balance, what each action costs and 30-day usage. Any key, no scope.
Any key
- GET
/api/credits/transactionsCredit ledger, newest first (?reason=&limit=&cursor=).
Any key
- POST
/api/credits/topupFree sandbox allowance (+500, at most 5 per 24 h, capped at 5,000).
Session · 10/min