CORE CONCEPTS
Environments
Develop and test your integration safely before processing real transactions.
Test and live environments
Sobtra separates test transactions from live transactions so you can develop and validate your integration without mixing test data with production billing records.
Test environment
Use test credentials and test transactions while developing, debugging, and validating your integration.
Live environment
Use live credentials and live transactional data for your production integration.
What is environment-specific?
Sobtra's transactional records include an environment so test activity can be kept separate from live activity.
- Customers
- Payment methods
- Subscriptions
- Invoices
- Payments
- Refunds
- Webhook events
Selecting an environment
Use credentials intended for the environment in which you are operating. Some endpoints also expose an environment query parameter.
Request a test-environment resource
curl "$SOBTRA_API_URL/merchants/YOUR_MERCHANT_ID/customers?environment=test" \
-H "Authorization: Bearer YOUR_TEST_API_KEY" \
-H "Accept: application/json"Request a live-environment resource
curl "$SOBTRA_API_URL/merchants/YOUR_MERCHANT_ID/customers?environment=live" \
-H "Authorization: Bearer YOUR_LIVE_API_KEY" \
-H "Accept: application/json"Safe testing practices
- Use test API keys during development.
- Never use live payment credentials to simulate test payments.
- Do not assume a test customer or subscription exists in the live environment.
- Keep test and live webhook configurations separate where the provider supports it.
- Verify environment handling before enabling production billing.
Going live
Before switching to production, verify that your live credentials, payment gateway configuration, webhook processing, and application behavior are correct. Start with a controlled production test and monitor the resulting billing records.