Environments at a glance
SohoPay maintains two isolated environments. Keys, agents, credit facilities, orders, and webhooks never cross between them.SohoPay production access is currently rolling out to beta integrators. For mainnet production onboarding slots, contact your account representative or reach out in the beta Slack (see Support).
Configure your environment
Select the tab that matches your integration model:- AI Agent / MCP Integration
- REST API & Backend Services
If you are operating AI assistants (Cursor IDE, Claude Desktop, Windsurf, or custom agent frameworks) using the Model Context Protocol:
1. Terminal Pairing
Run the login CLI command to pair your local terminal with your account:2. Client Configuration
You can connect directly via SohoPay’s hosted remote MCP server (recommended, zero local setup) or configure a local stdio client:Base RPC & Network Configuration
The SohoPay API abstracts most direct blockchain communication. You only need direct Base RPC access if you verify on-chain settlement receipts yourself or run external event indexers.Viem Client Example
Test USDC Faucet
Sandbox agents do not need test USDC to start spending — their credit lines are pre-loaded in the sandbox and settlements execute against SohoPay liquidity pools. You only need faucet USDC if you want to test:- Wallet Repayment: Repaying your borrowed principal via the Borrower Portal.
- Vault Deposits: Testing collateral deposits via
POST /vault/deposit.
How to get testnet USDC:
- Navigate to Circle’s official faucet: faucet.circle.com.
- Choose Base Sepolia network.
- Paste your test wallet address and claim test USDC.
- Add the USDC token contract to your wallet:
- Contract Address:
0x036CbD53842c5426634e7929541eC2318f3dCF7e - Decimals:
6 - Symbol:
USDC
- Contract Address:
API Key Security & Storage
Treat SohoPay API keys with the same security as production database credentials.- Environment Variables: Load keys via
.envfiles locally and ensure.env*is listed in your.gitignore. - Secrets Managers: In deployed production environments, inject keys using secret managers (AWS Secrets Manager, Google Secret Manager, HashiCorp Vault, or Doppler).
- Environment Isolation: Keep sandbox (
sk_test_) and production (sk_live_) secrets strictly isolated to avoid accidental cross-environment transactions.
Connectivity & Health Troubleshooting
If you encounter connection or authorization issues, check the following:- Health Endpoint: Verify SohoPay API service availability:
(Healthy response returns
{"status":"ok"}or200 OK). - Prefix Errors (404 Not Found): Ensure your requests use the
/api/v1prefix (https://staging.api.sohopay.xyz/api/v1/...). - Key Mismatch (401 Unauthorized): Ensure you aren’t passing a
sk_test_key to the production URL or ask_live_key to the staging URL. - Rate Limits (429 Too Many Requests): Check the
Retry-Afterheader. Agent-level limits are governed by the Policy Service. - Corporate Firewalls: If your network proxy restricts
.xyztop-level domains, allowlist*.sohopay.xyzin your egress rules.
Next steps
Quickstart
Run an MCP agent or settle your first x402 payment in 5 minutes.
Authentication
Learn about Bearer authentication, EIP-712 signing, and key rotation.
Borrower Portal
Explore live credit utilization, agent management, and debt repayment.

