Sandbox Environment Setup

This guide explains how to set up and use the FinHub sandbox environment for testing your integration before moving to production.

Sandbox Overview

The sandbox environment is a fully functional replica of our production environment, allowing you to test all API endpoints and workflows without affecting real data or transactions. All operations in the sandbox use simulated data and test accounts.

Accessing Your Sandbox

After completing the tenant onboarding process, you’ll receive:

  1. API Key & Secret: Credentials for authenticating with the sandbox API
  2. Tenant Dashboard Access: Login details for your sandbox tenant dashboard
  3. Test Account Credentials: Pre-configured test accounts for different user roles

Sandbox Base URLs

Use the following base URLs for all API calls in the sandbox environment:

API Base URL: https://api-sandbox.finhub.com/v2
Authentication URL: https://auth-sandbox.finhub.com/v2
Webhook URL: https://webhook-sandbox.finhub.com/v2

Setting Up Your Development Environment

1. Store API Credentials Securely

Store your API credentials in environment variables or a secure configuration system, never in your source code:

# Example environment variables
FINHUB_API_KEY=your_sandbox_api_key
FINHUB_API_SECRET=your_sandbox_api_secret
FINHUB_API_URL=https://api-sandbox.finhub.com/v2

2. Configure API Client

Set up your API client to use the sandbox base URL and authentication:

// Example JavaScript configuration
const finHubClient = new FinHubAPI({
  baseUrl: process.env.FINHUB_API_URL,
  apiKey: process.env.FINHUB_API_KEY,
  apiSecret: process.env.FINHUB_API_SECRET
});

3. Configure Webhook Endpoints

If your application uses webhooks, set up endpoints to receive sandbox webhook events:

  1. Create webhook receiver endpoints in your application
  2. Register these endpoints in your sandbox tenant dashboard
  3. Implement webhook signature verification for security

Testing in Sandbox

Test Accounts

Your sandbox environment comes with pre-configured test accounts:

Account TypeDescriptionLogin
AdminTenant administrator accountadmin@yourtenant.sandbox
B2C CustomerIndividual customer accountcustomer@test.sandbox
B2B CustomerBusiness customer accountbusiness@test.sandbox

Test Cards

For testing payment flows, use these test card numbers:

Card TypeNumberExpiryCVV
Visa (Success)4111 1111 1111 111112/25123
Mastercard (Success)5555 5555 5555 444412/25123
Visa (Decline)4000 0000 0000 000212/25123

Test Bank Accounts

For testing bank transfers:

Account NameIBANBIC
Test AccountGB29NWBK60161331926819NWBKGB2L
Test Account (Fail)GB29NWBK60161331926820NWBKGB2L

Sandbox Limitations

Be aware of these sandbox limitations:

  • Transaction processing is simulated and may complete instantly
  • Some compliance checks are simplified for testing purposes
  • External payment networks are simulated, not real connections
  • Daily processing limits are higher than production

Next Steps

After successfully testing your integration in the sandbox environment, proceed to the Production Setup guide to prepare for your production deployment.