Test Mode
Test mode gives you a safe, consequence-free sandbox to validate your integration before real shipments and real money flow through the platform. Both modes run on the same production environment — not a separate staging server — so what works in test will work in live.
How test mode works
Section titled “How test mode works”Mode is determined entirely by which API key you use. There is no mode parameter in the request body and no environment toggle. A single integration codebase can switch between modes by swapping the API key, typically via an environment variable.
| Key prefix | Mode |
|---|---|
dp_test_ | Test mode |
dp_live_ | Live mode |
Behavior comparison
Section titled “Behavior comparison”| Area | Live mode | Test mode |
|---|---|---|
| Fee calculation | Full calculation using production tariff database and exchange rates | Identical calculation — same tariff DB, same rates, same fee engine |
| Additional fees | Applied per brand configuration | Applied identically |
| Email notifications | Sent to the consignee’s real email | Suppressed. Logged as SIMULATED with full content viewable in dashboard |
| SMS notifications | Sent during the next daytime window | Suppressed. Logged as SIMULATED with message content visible |
| Payment page | Real payment methods are charged | Test mode — only test cards are accepted; no real charges |
| Payment processing | Real charges collected | No real charges; only test cards accepted |
| Receipts | Generated and emailed to consignee | Generated but not emailed. Viewable in dashboard, watermarked “TEST” |
| SFTP relay | Files pushed to SFTP server | Not pushed. Files generated and downloadable from dashboard |
| Webhook relay | POST sent to your endpoint | POST sent normally; test shipments are identifiable by the is_test field in the dashboard |
| Dashboard visibility | Default shipment list | Separate “Test” filtered view with visual indicator |
| Reports | Included in all report types | Excluded from live reports. Separate test export available |
| Data retention | 7-year retention per compliance | 90-day retention, then auto-purged |
| Opt-out preferences | Persisted and enforced | Isolated from live opt-outs |
Getting started with test mode
Section titled “Getting started with test mode”1. Generate a test API key
Section titled “1. Generate a test API key”In the dashboard, go to Settings > API Keys and click Generate New Key. Select Test mode, optionally restrict it to a specific brand, and add a label.
2. Make test requests
Section titled “2. Make test requests”Use the test key in your API requests:
curl -X POST https://api.dutypro.exelot.com/api/shipments/ \ -H "Content-Type: application/json" \ -H "X-API-Key: dp_test_YOUR_KEY_HERE" \ -d '{ ... }'The response is identical to live mode — same schema, same fee calculations. The is_test field in the response will be true.
3. Verify in the dashboard
Section titled “3. Verify in the dashboard”Switch to “Test” mode using the toggle in the dashboard header. Test shipments appear in a separate filtered view with a visible test indicator throughout the UI.
4. Test payments
Section titled “4. Test payments”Open the payment_link from the response. The payment page runs in test mode, so use test cards:
| Card number | Behavior |
|---|---|
4242 4242 4242 4242 | Succeeds |
4000 0000 0000 0002 | Declined |
Any future expiry date and any 3-digit CVC will work.
5. Verify status relay
Section titled “5. Verify status relay”If you use SFTP, test files are not pushed to the server. Download them from the dashboard instead.
Webhook events are delivered normally for test shipments. Test shipments are identifiable in the dashboard by their test badge.
Payment in test mode
Section titled “Payment in test mode”When a shipment is created with a test API key, the payment page runs in test mode. No real charges are collected — only test cards are accepted. This lets you verify the full payment flow without moving real money.
Dashboard experience
Section titled “Dashboard experience”A mode toggle in the dashboard header switches between “Live” and “Test” views. This toggle filters all data across the entire dashboard — shipment lists, communication logs, status relay logs, and reports.
Test shipments display a visible badge/banner to prevent confusion. When viewed in detail, they show the same fee breakdown, communication timeline, and status history as live shipments, but with simulated entries clearly labeled.
Data retention
Section titled “Data retention”Test data is retained for 90 days, then automatically purged. You can also manually purge test data at any time from the dashboard. Live data is retained for 7 years per compliance requirements.
Rate limits
Section titled “Rate limits”The same rate limits apply to both live and test mode. This prevents accidental load-testing scenarios that could affect production infrastructure.