Authentication
Secure access to the TaxBridge API using API keys. We support both sandbox and live environments with environment-specific keys.
API Keys
TaxBridge uses Bearer token authentication. All API requests
must include an Authorization header with your API key.
Sandbox Keys
Start with sk_test_ prefixed keys for development
and testing.
Live Keys
Use sk_live_ prefixed keys for production fiscalization.
Making Authenticated Requests
const response = await fetch('https://api.taxbridge.com/v1/tax-intents', {
headers: {
'Authorization': 'Bearer sk_test_1234567890abcdef',
'Content-Type': 'application/json'
}
}); import requests
response = requests.get(
'https://api.taxbridge.com/v1/tax-intents',
headers={
'Authorization': 'Bearer sk_test_1234567890abcdef'
}
) Taxpayer Context
For operations that affect specific taxpayers, include the X-Tax-Payer-ID
header to specify which taxpayer the request applies to.
The API key determines the environment (sandbox/live), while the taxpayer ID scopes operations to a specific taxpayer under your account.
curl -X POST https://api.taxbridge.com/v1/tax-intents \
-H "Authorization: Bearer sk_test_1234567890abcdef" \
-H "X-Tax-Payer-ID: tp_your_taxpayer_id" \
-H "Content-Type: application/json" \
-d '{"taxMethod": "DOMESTIC_STANDARD", ...}' Error Responses
Authentication failures return standard HTTP status codes with descriptive messages.
Best Practices
Store Keys Securely
Never commit API keys to version control. Use environment variables or secure key management.
Use Sandbox for Testing
Always test integrations with sandbox keys before going live.
Rotate Keys Regularly
Generate new keys periodically and update your applications.