Test Environment
Build and validate your NextSign integration safely without affecting production data.
Test Environment
NextSign provides a Test Environment that is a full replica of the production environment. It allows you to safely build, test, and validate your integration without affecting live data or real signing workflows.
The test environment mirrors production behavior, APIs, and workflows, making it the perfect sandbox for development and quality assurance.
Use Cases
The test environment is ideal for:
- API integration testing - Test all API endpoints and responses
- Webhook testing - Validate webhook payloads and event handling
- Document generation and signing flows - Test form submissions and case creation
- End-to-end workflow validation - Verify complete signing workflows
- Development and QA - Safe environment for developers and QA teams
- Staging deployments - Pre-production testing before going live
Test Environment URL
Access the test environment at:
https://test.nextsign.dkTest environment users are separate from production. You must create a new user on https://test.nextsign.dk to access the test environment, and all data and configurations are kept completely separate.
Key Characteristics
The test environment provides:
| Feature | Description |
|---|---|
| Same API structure | Identical endpoints and request/response formats as production |
| Same authentication | Uses Bearer Token authentication, configured the same way |
| Same webhook flow | Full webhook configuration and delivery system |
| Isolated data | No impact on production data or workflows |
| Safe testing | Perfect for development, QA, and staging purposes |
| Full feature parity | All production features available for testing |
Data created in the test environment is completely isolated from production and may be periodically cleared. Do not rely on test data for long-term storage.
API Keys in Test Environment
API keys are environment-specific and cannot be shared between test and production.
Key Separation
You must generate separate API keys for:
- ✅ Test environment - For development and testing
- ✅ Production environment - For live applications
API keys created in the test environment are NOT valid in production, and vice versa. Attempting to use a production API key in the test environment will result in authentication errors.
Creating Test API Keys
Generate test API keys from the test environment dashboard:
- Create a new user on https://test.nextsign.dk and log in with that test account
- Navigate to Dashboard → Config → API Keys
- Click Create API Key
- Enter a descriptive name (e.g.,
Development API Key) - Click Generate
- Copy and securely store the API key
Example test API key usage:
curl --location 'https://www.nextsign.dk/api/v2/{company}/cases/get' \
-H 'Authorization: Bearer TEST_API_KEY_HERE'Webhooks in Test Environment
Webhooks configured in the test environment are also isolated from production.
Test Webhook Behavior
Webhooks in the test environment:
- ✅ Trigger only for test cases and test workflows
- ✅ Must point to a publicly accessible test or staging endpoint
- ✅ Are ideal for validating webhook payloads and event handling
- ✅ Use the same event types and payload structure as production
Recommended Webhook Setup
For testing webhooks, you can:
- Use a staging server - Point to your staging/development backend
- Use webhook testing tools - Services like webhook.site or RequestBin
- Use ngrok for local development - Tunnel your local server for testing
Example test webhook configuration:
URL: https://staging.yourapp.com/webhooks
Headers:
X-Signature: test-secret-key
Triggers:
☑ Case created
☑ Case signed
☑ Case deniedTest webhooks will only receive events from test cases. This ensures complete isolation between test and production environments.
Testing Best Practices
1. Use Environment Variables
Keep your API keys and configuration separate using environment variables:
NEXTSIGN_API_URL=https://www.nextsign.dk/api
NEXTSIGN_API_KEY=your_test_api_key_here
NEXTSIGN_COMPANY_ID=your_test_company_idNEXTSIGN_API_URL=https://www.nextsign.dk/api
NEXTSIGN_API_KEY=your_production_api_key_here
NEXTSIGN_COMPANY_ID=your_production_company_id2. Test All Event Types
Ensure you test all webhook event types in the test environment:
- Case created
- Recipient signed
- Case signed
- Case denied
- Workflow completed
3. Validate Complete Workflows
Test the entire signing workflow from start to finish:
- Create a form or submit a case
- Send for signing
- Complete the signing process
- Verify webhook delivery
- Retrieve signed documents
4. Load Testing
Use the test environment for load testing to understand API rate limits and performance characteristics.
5. Error Handling
Test error scenarios:
- Invalid API keys
- Missing required fields
- Malformed requests
- Webhook failures and retries
Differences from Production
While the test environment mirrors production, be aware of these differences:
| Aspect | Test Environment | Production Environment |
|---|---|---|
| Data persistence | May be periodically cleared | Permanent storage |
| Email delivery | May go to test email addresses | Real recipient emails |
| API keys | Separate test keys required | Separate production keys required |
| Webhooks | Point to staging/test endpoints | Point to production endpoints |
| Domain | test.nextsign.dk | nextsign.dk |
| Performance | May have lower rate limits | Production rate limits |
Email notifications in the test environment may be sent to test addresses or suppressed entirely to prevent accidental communication with real recipients.
Going Live
Once your integration has been fully tested in the test environment, follow these steps to deploy to production:
Pre-Launch Checklist
- All API integrations tested and working in test environment
- Webhook endpoints tested and validated
- Complete signing workflows tested end-to-end
- Error handling and edge cases covered
- Security best practices implemented
- Documentation and runbooks prepared
Migration Steps
-
Switch to the production dashboard
- Log in to https://nextsign.dk
-
Generate production API keys
- Navigate to Dashboard → Config → API Keys
- Create new API keys for production use
- Store them securely in your production secrets manager
-
Update your application configuration
- Replace test API keys with production keys
- Update environment variables
- Change API base URLs if different
- Update company identifiers
-
Recreate webhooks in production
- Configure the same webhook triggers as test
- Point to production endpoints (not staging)
- Use production secret keys for signature validation
- Test webhook delivery with a real case
-
Verify production setup
- Test a complete workflow in production
- Verify webhook delivery
- Check document retrieval
- Monitor for errors
Example Environment Switch
const config = {
test: {
apiUrl: 'https://www.nextsign.dk/api',
apiKey: process.env.NEXTSIGN_TEST_API_KEY,
companyId: 'test-company-id'
},
production: {
apiUrl: 'https://www.nextsign.dk/api',
apiKey: process.env.NEXTSIGN_PROD_API_KEY,
companyId: 'prod-company-id'
}
};
const env = process.env.NODE_ENV || 'test';
module.exports = config[env];Never use test API keys in production or production API keys in test. Always maintain strict separation between environments.
Monitoring and Debugging
Test Environment Logs
Monitor your test integration using:
- Dashboard logs - View case creation and signing activity
- Webhook logs - Check webhook delivery status and payloads
- API response codes - Validate request/response patterns
Common Issues
Authentication Errors
- Verify you're using test API keys in the test environment
- Check that API keys are correctly configured in headers
Webhook Not Triggering
- Ensure webhooks are enabled (Active toggle is ON)
- Verify the webhook URL is publicly accessible
- Check webhook logs in the dashboard for delivery errors
Rate Limiting
- Test environment may have lower rate limits than production
- Design your client around the documented
100 requests per minutelimit - Implement retry logic with exponential backoff
Support
If you encounter issues while testing:
- Check the dashboard logs for error messages
- Review the webhook delivery logs for webhook issues
- Verify your API key configuration
- Consult the API documentation for endpoint requirements
- Contact NextSign support with specific error details
When reporting issues, always specify whether the problem occurs in the test environment, production environment, or both.