Overview
Smartbills provides two distinct environments to help you develop and test your integration before going live. Each environment is fully isolated with its own data, API keys, and configuration.Available Environments
Sandbox Environment
The sandbox environment is a safe space for development and testing. No real data is processed or stored. Base URL:- Available immediately to all developer accounts
- Uses test API keys (
sk_test_...) - Separate test data that does not affect production
- Higher rate limits for faster development
- Pre-populated with sample data for testing
- No real charges or transactions
All developer accounts have immediate access to the sandbox environment. No approval is required.
Production Environment
The production environment is where your live application runs and processes real data. Base URL:- Uses live API keys (
sk_live_...) - Real customer and business data
- Standard rate limits apply
- Processes real expenses and reports
- Requires application approval before access
Production API keys are enabled once your application has been reviewed and approved.
Key Differences
Switching Between Environments
You can switch between environments by changing the base URL and API key in your application:Environment Configuration
Using Environment Variables
Store your API keys and base URLs as environment variables to easily switch between environments:Configuration Example
Test Data in Sandbox
The sandbox environment comes pre-populated with sample data to help you test your integration:- Sample businesses with pre-configured settings
- Sample expenses in various statuses (pending, approved, rejected)
- Sample expense reports with complete approval workflows
- Sample categories, departments, and locations
- Sample vendors with different configurations
Data Isolation
Data between environments is completely isolated:- Users created in sandbox do not exist in production
- Expenses and reports are environment-specific
- Webhooks are sent to different endpoints per environment
- API keys only work in their respective environments
Getting Access
Sandbox Access
- Create a Smartbills account at smartbills.io
- Visit the developer portal
- Create a new application
- Your sandbox API keys will be generated immediately
Production Access
1
Complete Integration in Sandbox
Build and test your integration using sandbox API keys.
2
Submit for Review
Submit your application for review through the developer portal.
3
Review Process
Our team reviews your integration to ensure it meets our guidelines.
4
Production Keys Activated
Once approved, your production API keys will be activated.
Best Practices
Use Environment Variables
Use Environment Variables
Store API keys and base URLs as environment variables. Never hardcode them.
Test Thoroughly in Sandbox
Test Thoroughly in Sandbox
Always test your integration thoroughly in sandbox before deploying to production. Test all API endpoints, error handling, webhook delivery, and data formats.
Keep Separate API Keys
Keep Separate API Keys
Use different API keys for each environment and never use production keys in development or testing.
Monitor Both Environments
Monitor Both Environments
Set up monitoring and logging for both environments to catch issues early.
Related Resources
API Keys
Create and manage API keys
Authentication
Authentication setup
API Introduction
API overview and getting started
Rate Limits
Environment-specific rate limits