Skip to main content
Sandbox uses the same API endpoints, authentication, and response formats as production. Behavior is simulated (no real transactions), making it easy to transition your code when ready.

Key concepts in Sandbox

ResourceDirectionDescription
Account-Your asset balance within Coinbase that you fund with test amounts (e.g., your USD balance with $1000 test funds)
Deposit destinationIncoming cryptoPlaceholder addresses for receiving crypto. Simulate deposits via Portal UI
Payment methodOutgoing fiatExternal bank accounts for fiat withdrawals. Three pre-configured test banks shared across all accounts (Fedwire JPMorgan, Fedwire Bank of America, SWIFT Deutsche Bank)
TransferBothMove funds to crypto addresses, emails, or payment methods. All simulated

Sandbox vs. Production

Sandbox and production offer the same endpoints and functionality, but with different data and behavior.

Operational differences

SandboxProduction
Base URLsandbox.cdp.coinbase.comapi.cdp.coinbase.com
API keysSandbox-specific credentialsProduction credentials
Rate limitsSame as productionStandard production limits
Data persistencePermanentPermanent
PerformanceResponse times may varyStandard production performance
Third-party servicesMocked responsesReal integrations
Compliance checksSimplified (no real KYC/AML)Full compliance flows

Resource differences

SandboxProduction
AccountsCreate via Sandbox UI (funding only via UI)Link existing Prime portfolio or Coinbase Business account
Deposit destinationsPlaceholder addresses; simulate deposits via Sandbox UIReal blockchain addresses
Payment methodsThree test methods: Fedwire (active), Fedwire (inactive), SWIFT (active)Automatically linked from Prime/Business
TransfersSimulated (webhooks fire, no blockchain activity)Real blockchain transactions
WebhooksSupportedSupported
Fully simulated - no blockchain connectivity. All transactions are simulated within Sandbox—no mainnet or testnet. This allows faster, more reliable testing.

Best practices

Keep Sandbox configuration completely separate from production:
// config.ts
const config = {
  sandbox: {
    apiUrl: 'https://sandbox.cdp.coinbase.com',
    apiKey: process.env.CDP_SANDBOX_API_KEY,
  },
  production: {
    apiUrl: 'https://api.cdp.coinbase.com',
    apiKey: process.env.CDP_PRODUCTION_API_KEY,
  }
};

export const getConfig = () => {
  return process.env.NODE_ENV === 'production'
    ? config.production
    : config.sandbox;
};
Use Sandbox to thoroughly test error scenarios:
  • Invalid authentication
  • Malformed requests
  • Rate limiting
  • Network timeouts
  • Insufficient funds
  • Invalid account details
Create automated test suites that run against Sandbox:
// tests/integration/payments.test.ts
describe('Payments API Integration', () => {
  beforeAll(() => {
    // Set up sandbox client
  });

  test('should process transfer', async () => {
    const transfer = await createTransfer({
      amount: '100.00',
      currency: 'USD'
    });

    expect(transfer.status).toBe('pending');
  });
});
Track your API usage patterns in Sandbox to understand production requirements:
  • Request volumes
  • Response times
  • Error rates
  • Rate limit consumption