Environments
Invostaq has two environments — sandbox and production. Each has its own base URL. The environment is also determined by your API key prefix.
Sandbox
- API key prefix:
sk_test_ - Peppol network: TEST
- Invoices: Validated and submitted to the test network. Never reach real recipients.
- Webhooks: Status callbacks (
Delivered/Failed) arrive with real timing from the test network. - Lookup: Returns test-network registrations only.
Use sandbox for development, integration testing, and CI pipelines.
Production
- API key prefix:
sk_live_ - Peppol network: PROD
- Invoices: Legally binding. Delivered to real recipients via the Peppol network.
- Webhooks: Status callbacks reflect real delivery outcomes.
- Lookup: Returns production-network registrations only.
Switching environments
The request format is identical between environments. Use the correct base URL and key prefix:
# Sandbox — invoices go to Peppol TEST
curl -H "x-api-key: sk_test_..." \
"https://api.sandbox.invostaq.com/api/participants/lookup?participantId=0196:971501234567"
# Production — invoices go to Peppol PROD
curl -H "x-api-key: sk_live_..." \
"https://api.invostaq.com/api/participants/lookup?participantId=0196:971501234567"
Best practices
- Use
sk_test_keys in development, staging, and CI environments - Use
sk_live_keys only in production - Each environment should have its own API key — don't share keys across environments
- Test your full integration flow (send, receive webhook, handle errors) in sandbox before going live