This page covers everything your environment needs before you integrate: which base URLs to call, how to reach the Base networks directly, where to get test USDC, and how to store API keys safely. Read it once before your first deploy — most integration failures trace back to a wrong URL or a mismatched key prefix.

Environments at a glance

SohoPay runs two isolated environments. Keys, agents, orders, and webhooks never cross between them.
SohoPay is pre-mainnet. The mainnet environment is documented here so you can prepare your configuration, but production access is rolling out to beta integrators first. Ask in the beta Slack (see Support) for your onboarding slot.
Point your client at the sandbox base URL with a sk_test_ key:
Sandbox agents come with test credit lines and auto-signing ("signature": "sandbox_auto"), so you can settle payments without touching a wallet. Settlement lands on Base Sepolia in about a second, and you can verify transactions on Sepolia Basescan.

Base RPC configuration

You only need direct RPC access if you verify settlements on-chain yourself or run your own signing infrastructure. The SohoPay API handles all chain interaction otherwise. Example viem client for Base Sepolia:
Public RPCs are rate-limited and best-effort. For anything beyond occasional verification, use a dedicated provider (Alchemy, QuickNode, or Coinbase Developer Platform) with the same chain IDs.

Test USDC faucet

Sandbox agents do not need test USDC — their credit lines are pre-funded, and settlement runs against SohoPay’s sandbox liquidity. You only need faucet USDC for one scenario: testing vault funding with deposits from a wallet you control. For that case, use Circle’s official faucet:
  1. Go to faucet.circle.com.
  2. Select Base Sepolia as the network.
  3. Paste your wallet address and request USDC.
The faucet dispenses testnet USDC directly to your address; allow a minute for confirmation before calling POST /vault/deposit.

API key storage

Treat API keys like passwords. The two prefixes make leaks easy to spot in logs — but the goal is never having them in logs at all.
  • Environment variables — the minimum bar. Load from .env locally and keep .env in .gitignore. Never hardcode a key in source.
  • Secrets managers — for anything deployed: AWS Secrets Manager, Google Secret Manager, HashiCorp Vault, Doppler, or 1Password for teams. Inject at runtime; don’t bake keys into container images.
  • One key per service — give each deployed service its own key so you can rotate or revoke one without touching the others.
  • Separate sandbox and mainnet configs — keep them in different secret scopes so a staging deploy can never pick up a sk_live_ key.
Never embed API keys in client-side code — browser bundles, mobile apps, or agent prompts. Anyone can extract them. All SohoPay calls must originate from your backend. See Authentication & Security for the full key lifecycle.

Network troubleshooting

Common connectivity issues, roughly in the order they occur:
  • 401 INVALID_API_KEY on a key that works elsewhere — you’re crossing environments: a sk_test_ key against api.sohopay.xyz (or vice versa). Check the base URL first.
  • DNS or TLS failures — corporate proxies sometimes block .xyz domains. Confirm with curl -v https://api-sandbox.sohopay.xyz/v1/health and allowlist both API hosts in your egress rules.
  • 429 RATE_LIMITED — back off for the number of seconds in the Retry-After header. Per-agent limits are enforced by the Policy Service; see Rate Limits.
  • Timeouts on public RPCsepolia.base.org throttles aggressively. Retry with backoff or switch to a dedicated provider.
  • Payments stuck in pending — the MPC design is fail-closed: if the Policy Service is unavailable, no settlements occur. Check API health and the maintenance window (Sun 02:00–02:30 UTC) before debugging your own code. See SLA.
Still stuck? Capture the request_id from the error envelope and follow Troubleshooting.

Next steps

Authentication & Security

Key formats, Bearer auth, rotation, and webhook signing.

Integration Paths

Pick the merchant, agent, or end-to-end track.

Testing Guide

Simulate failures and edge cases in the sandbox.