NextSign API
Getting Started

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.dk

Test 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:

FeatureDescription
Same API structureIdentical endpoints and request/response formats as production
Same authenticationUses Bearer Token authentication, configured the same way
Same webhook flowFull webhook configuration and delivery system
Isolated dataNo impact on production data or workflows
Safe testingPerfect for development, QA, and staging purposes
Full feature parityAll 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:

  1. Create a new user on https://test.nextsign.dk and log in with that test account
  2. Navigate to Dashboard → Config → API Keys
  3. Click Create API Key
  4. Enter a descriptive name (e.g., Development API Key)
  5. Click Generate
  6. Copy and securely store the API key

Example test API key usage:

cURL - Test Environment
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

For testing webhooks, you can:

  1. Use a staging server - Point to your staging/development backend
  2. Use webhook testing tools - Services like webhook.site or RequestBin
  3. 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 denied

Test 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:

.env.development
NEXTSIGN_API_URL=https://www.nextsign.dk/api
NEXTSIGN_API_KEY=your_test_api_key_here
NEXTSIGN_COMPANY_ID=your_test_company_id
.env.production
NEXTSIGN_API_URL=https://www.nextsign.dk/api
NEXTSIGN_API_KEY=your_production_api_key_here
NEXTSIGN_COMPANY_ID=your_production_company_id

2. 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:

  1. Create a form or submit a case
  2. Send for signing
  3. Complete the signing process
  4. Verify webhook delivery
  5. 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:

AspectTest EnvironmentProduction Environment
Data persistenceMay be periodically clearedPermanent storage
Email deliveryMay go to test email addressesReal recipient emails
API keysSeparate test keys requiredSeparate production keys required
WebhooksPoint to staging/test endpointsPoint to production endpoints
Domaintest.nextsign.dknextsign.dk
PerformanceMay have lower rate limitsProduction 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

  1. Switch to the production dashboard

  2. 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
  3. Update your application configuration

    • Replace test API keys with production keys
    • Update environment variables
    • Change API base URLs if different
    • Update company identifiers
  4. 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
  5. Verify production setup

    • Test a complete workflow in production
    • Verify webhook delivery
    • Check document retrieval
    • Monitor for errors

Example Environment Switch

config.js
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 minute limit
  • Implement retry logic with exponential backoff

Support

If you encounter issues while testing:

  1. Check the dashboard logs for error messages
  2. Review the webhook delivery logs for webhook issues
  3. Verify your API key configuration
  4. Consult the API documentation for endpoint requirements
  5. Contact NextSign support with specific error details

When reporting issues, always specify whether the problem occurs in the test environment, production environment, or both.