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://test.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://test.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 |
| e-ID login | Test users only, see Signing with an e-ID | Real MitID, BankID and Personalausweis |
| e-Boks | Not sent | Delivered to the recipient's e-Boks |
| 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.
e-Boks letters are not sent from the test environment, and neither are the physical letters that can replace them. To check an e-Boks letter, create the case in production as a draft ("state": "draft"): it is filled in, but nothing is sent. See Test before you send.
Signing with an e-ID in the test environment
An e-ID login in the test environment runs against the e-ID's own test system. A real MitID or BankID does not work there, and a test user does not work in production. Create a test user for each method you want to try before you open a signing link.
Each e-ID has its own test tools:
| Signing method | What you need | Test tools |
|---|---|---|
MitID Privat (urn:grn:authn:dk:mitid:low, urn:grn:authn:dk:mitid:substantial) | A MitID test user, and either the MitID test app or the app simulator | MitID Test Tool, MitID test app |
MitID Erhverv (urn:grn:authn:dk:mitid:business) | A test organization, and a test user connected to it as an employee | Test organization, MitID Test Tool, MitID Simulator |
BankID SE (urn:grn:authn:se:bankid) | A test BankID, and a BankID app set up for testing | BankID test portal |
BankID NO (urn:grn:authn:no:bankid) | A test user from BankID Norway's pre-production portal, see below | BankID Norway test portal |
Personalausweis (urn:grn:authn:de:personalausweis) | The AusweisApp with its simulator, or a physical test card | AusweisApp |
Touch (draw) | Nothing. There is no e-ID login | No test user needed |
A few things that trip people up:
- Create the test user first. A new Norwegian BankID test user can take up to an hour to become active.
- One app, one environment. The Swedish BankID app works either in test or in production, not both, so use a separate device for testing. The MitID app has the same limit on Android. On iOS you can install both the test and the production app.
- CPR match. For a recipient with
needsCpr: true, send the CPR number of your MitID test user as the recipient'scpr. You find it in the MitID Test Tool. - Names. Give the recipient the same name as the test user. If the two names have nothing in common, a
recipient_name_mismatchwebhook is sent when the recipient signs. - BankID NO is not in the default set. Add
urn:grn:authn:no:bankidtosigningSchemasto offer it. See Signing Schemas.
To try the whole signing flow without any e-ID, offer draw (Touch). The recipient signs by drawing, so no test user is needed.
BankID NO test user
Norwegian BankID test users are created in BankID Norway's pre-production portal:
- Open the test portal and click Generate number. Copy the national identity number, because the portal does not store it.
- In the order form, enter a first name, a last name and a BankID friendly name. Choose Netcentric, choose BankID TestBank under HA services, and click Order.
- Click the pencil icon and add a phone number and an email address in the right format. Any values work, and nothing is sent to them.
- Wait for the test user to become active. This can take up to an hour.
- Sign in with the generated number as the user name, the one-time password
otpand the passwordqwer1234. These two values are the same for every test user.
If the one-time password is rejected later, the test certificate has expired. Find the test user by its number in the portal, order a new Netcentric BankID with BankID TestBank, and try again.
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://test.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
e-ID Login Fails
- Use a test user from the e-ID's test system. A real MitID or BankID does not work in the test environment
- Check that the e-ID app is set up for testing, not production
- A new Norwegian BankID test user can take up to an hour to become active. If its one-time password is rejected later, the test certificate has expired: order a new test BankID for it, see BankID NO test user
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.