Skip to main content
The Zinc API provides a sandbox environment for testing your integration without placing real orders or incurring charges. Test mode uses isolated data and simulates various order scenarios.

Enabling Test Mode

Use an API key with the zn_test_ prefix:
Test mode uses a separate sandbox database. Orders created in test mode are completely isolated from production data.

Test Products

Use these special product URLs to simulate different order scenarios:

Get Test Products Programmatically

You can also retrieve the full list of test products from the API:

Example Response

Error Timing

Test scenarios produce errors at different stages:

Synchronous Errors

These errors occur immediately when creating the order:
  • test-invalid-address - Returns invalid_shipping_address error
  • test-url-unreachable - Returns url_unreachable error
  • test-insufficient-funds - Returns insufficient_funds error

Example

Asynchronous Errors

These errors occur during order processing and are delivered via webhooks:
  • test-out-of-stock - Order fails with product_out_of_stock
  • test-price-exceeded - Order fails with max_price_exceeded
  • test-invalid-variant - Order fails with invalid_variant
  • test-shipping-unavailable - Order fails with shipping_unavailable
The order is created successfully, but transitions to failed status during processing.

Test Success Scenario

The test-success product simulates a complete successful order:

Successful Test Order Response

When retrieved after processing:

Skipped Validations

In test mode, the following validations are bypassed to simplify testing:
  • Wallet balance checks
  • US retailer URL validation
  • URL reachability validation
  • Shipping address country validation
  • Address verification via external APIs
Test mode behavior differs from production. Always perform final testing with real orders before going live.

Data Isolation

Test mode data is completely isolated:
  • Orders created in test mode are stored in a sandbox database
  • Test orders do not appear in production order lists
  • Production orders do not appear in test mode
  • Wallet balances are separate between test and production

Best Practices

  1. Start with test mode - Build and test your entire integration using test products before switching to production
  2. Test all scenarios - Use each test product to verify your error handling works correctly
  3. Test webhooks - Configure webhooks and verify you receive events for both successful and failed test orders
  4. Verify error handling - Ensure your application gracefully handles both synchronous and asynchronous errors
  5. Use consistent mode - Don’t mix test and production API keys in the same environment