Give your coding agent one prompt. Get a paid API.
No slash commands. No agent-specific syntax. Paste the same plain-English prompt into Codex, Claude Code, Cursor, Antigravity, or any other coding agent.
Add Access402 x402 payments to this existing application.
Install @access402/cli@0.4.0, then use the CLI to configure and verify the integration. If this repository already contains Access402 skill instructions, follow them.
Before making changes, ask me these two setup questions:
1. Should this use Sandbox/test payments or Live/production payments?
2. Which endpoints should be protected, and what USDC price should each endpoint cost? Ask for the HTTP method, path, and price, for example: GET /api/report — 0.02 USDC.
Wait for both answers before running setup. After detecting the application metadata, propose a project name and ask me to confirm it or provide a replacement. Do not ask me to approve the installation name; derive it from the confirmed project and adapter, then proceed.
1. Detect the application stack.
2. Prefer the native Access402 adapter when one is available.
3. Otherwise configure the Access402 HTTP Gateway. Use its Worker-native export for Cloudflare Workers or Sites.
4. Run Access402 device authorization and let me approve access in the browser.
5. Create or select my project and receiving wallet. Reuse a healthy installation and add authorized URLs instead of creating duplicates.
6. Store installation credentials only in server-side secrets.
7. Keep route policy in the repository as the source of truth.
8. Run access402 sync before deployment so route schemas, pricing, and discovery metadata are registered outside the customer request path.
9. Run access402 doctor and validate every HTTP 402 challenge. Verify that Live discovery-enabled routes expose /.well-known/ard.json, /openapi.json, and /llms.txt.
10. If I chose Sandbox, check my buyer wallet's Base Sepolia USDC balance. If it is unfunded, give me the exact Coinbase faucet link and wait for me to fund the buyer address—not the receiving wallet.
11. If I chose Sandbox, open the protected route so I can sign one test payment. If I chose Live, do not attempt a real payment without asking for my explicit approval.
12. Report the files changed, protected routes, exact prices, network, receiving wallet, discovery URLs, and test results.
Do not expose credentials, enable Live without my explicit instruction, or leave the application origin reachable around the payment gateway.Same prompt for Codex, Claude Code, Cursor, Antigravity, and other coding agents.
See it in action
Watch the demo.
See how a coding agent takes the Access402 prompt from setup through a working paid endpoint.
FAQ
One Access402 workflow across your tools.
Clear answers about coding-agent compatibility, setup, credentials, testing, and how paid resources work.
No. The copied prompt provides the workflow and safety rules, while the CLI configures the account, adapter, repository, and diagnostics.
The agent installs the Access402 HTTP Gateway in front of the application and stores route pricing in a framework-neutral access402.yaml file.
No. Coinbase facilitator credentials remain inside Access402. The deployment receives only a scoped, revocable installation credential.
No. The workflow uses Sandbox by default and requires an explicit instruction before writing Live configuration.
The buyer wallet that signs the payment needs Base Sepolia test USDC. Access402 creates the project receiving wallet during authorization; do not send faucet funds to that receiving wallet by mistake.
No. Paste the same prompt into any coding agent. It uses repository instructions when present and otherwise runs the versioned Access402 CLI directly.
Access402 works with Codex, Claude Code, Cursor, Antigravity, and other coding agents that can edit a repository and run terminal commands. The same universal prompt and versioned Access402 CLI workflow apply across those tools.
Access402 publishes discovery-enabled routes through ARD, OpenAPI 3.1, and llms.txt, then protects the route with x402. An unpaid request receives a machine-readable HTTP 402 response; after the agent pays and retries, Access402 verifies the payment and unlocks the requested resource.
Tell your agent what to monetize.
Paste the same prompt anywhere. Authorize Access402 once. Let your coding agent configure and verify everything else.
