This guide covers everything your environment needs before you integrate with SohoPay: which base URLs to call, how to configure MCP clients (Cursor, Claude Desktop, Windsurf), how to reach Base networks, and how to store API keys safely.

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:
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

Public RPC endpoints are rate-limited. For high-volume production integrations, use a dedicated RPC provider (such as Alchemy, QuickNode, or Coinbase Developer Platform) using the chain IDs above.

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:
  1. Wallet Repayment: Repaying your borrowed principal via the Borrower Portal.
  2. Vault Deposits: Testing collateral deposits via POST /vault/deposit.

How to get testnet USDC:

  1. Navigate to Circle’s official faucet: faucet.circle.com.
  2. Choose Base Sepolia network.
  3. Paste your test wallet address and claim test USDC.
  4. Add the USDC token contract to your wallet:
    • Contract Address: 0x036CbD53842c5426634e7929541eC2318f3dCF7e
    • Decimals: 6
    • Symbol: USDC

API Key Security & Storage

Treat SohoPay API keys with the same security as production database credentials.
  • Environment Variables: Load keys via .env files 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.
Never commit API keys to version control or expose them in client-side code (frontend JavaScript bundles or public AI prompt templates). All API calls must originate from secure backend servers.

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"} or 200 OK).
  • Prefix Errors (404 Not Found): Ensure your requests use the /api/v1 prefix (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 a sk_live_ key to the staging URL.
  • Rate Limits (429 Too Many Requests): Check the Retry-After header. Agent-level limits are governed by the Policy Service.
  • Corporate Firewalls: If your network proxy restricts .xyz top-level domains, allowlist *.sohopay.xyz in 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.