Environments and test data
Referral partners receive access to the same core integration surface in both test and production. Operational behavior differs between environments as described below, and endpoints intended to create or manipulate test data are unavailable in production.
Base URLs
Referral Partner API
| Environment | Base URL |
|---|---|
| Test | https://testreferral-api.debitura.com |
| Production | https://referral-api.debitura.com |
Customer API
| Environment | Base URL |
|---|---|
| Test | https://testcustomer-api.debitura.com |
| Production | https://customer-api.debitura.com |
White-Label Onboarding UI
| Environment | Base URL |
|---|---|
| Test | https://testreferral.debitura.com |
| Production | https://referral.debitura.com |
Client Application
| Environment | Base URL |
|---|---|
| Test | https://testapp.debitura.com |
| Production | https://app.debitura.com |
Environment Differences
| Aspect | Test | Production |
|---|---|---|
| Real collection activity | No | Yes |
| Emails sent | Suppressed* | Yes |
| Data persistence | May be reset | Permanent |
*Email suppression: The test environment suppresses all emails to non-whitelisted domains by default. If you need to receive emails during testing, contact your Debitura partner contact to whitelist your domain.
Test data
isTest: trueon an invoice or case creates classified test data. It doesn't skip validation or business errors. Use it in test, and for a single dry run in production; see Go live.- Completing onboarding in test. Signing asks for a verification code sent by email, and test emails reach only whitelisted domains. Ask your partnership contact to arrange a test address that can receive the code. Complete the actual signing flow, then read the client's
onboardingDonethrough the API. - Public demo simulation. The test demo uses
123456only for an isolated demo session: both the partner and client must be marked as demo records. It demonstrates the screens without signing an actual agreement. A demo-flagged partner alone does not give ordinaryPOST /clientsaccounts a fixed verification code. See the AI integration recipe. - Use fictional companies and people in test, never real client identities.
Reset test clients
Delete test clients to re-run onboarding from scratch.
When testing the client onboarding flow multiple times with the same email, the matching algorithm returns 409 conflicts. The reset endpoints let you delete test clients so you can start fresh.
Available on test environment only. These endpoints return 403 Forbidden in production.
Check if Deletable
Before deleting, verify the client has no blocking data:
GET https://testreferral-api.debitura.com/clients/{externalTenantId}/is-deletable
XApiKey: YOUR_API_KEY
Response:
{
"isDeletable": true,
"blockers": []
}
If isDeletable is false, the blockers array contains plain strings explaining why (there is no wrapping object with a reason field). Only active state blocks deletion — already-closed cases do not:
| Blocker string | Solution |
|---|---|
Active case — must be closed before account deletion. | Close the active case first |
You have pending lead quotes that must be resolved before deleting your account. | Resolve leads with open quotes first |
Unpaid partner commission — must be reconciled before account deletion. | Reconcile the outstanding partner commission first |
Delete the Client
Once verified deletable:
DELETE https://testreferral-api.debitura.com/clients/{externalTenantId}
XApiKey: YOUR_API_KEY
Returns 204 No Content on success.
What gets deleted (cascade):
- All collection cases and invoices for the client (including invoice lines, payments, blobs)
- All leads for the client
- The Creditor account (soft-deleted)
- The ReferralPartnerClientLink (archived)
- Associated users (if they have no other creditor relations)
Nothing is retained — the reset removes the client and all of its child data so you can re-run onboarding from scratch.
After Reset
Call POST /clients with the same email:
- The matching algorithm won't find the deleted client
- A new client is created
IsAttributedClientistrue(treated as new introduction)
Constraints
- Your clients only — You can only delete clients linked to your partner account
- Pending approvals unaffected — If a client hasn't approved a link request (409 scenario), there's nothing to delete yet. The link request expires after the configured per-partner TTL (
ApprovalTtlDays, default 7 days, clamped 1–30 days).
Error Handling
| Status | Cause | Solution |
|---|---|---|
403 Forbidden | Production environment | Only available on test |
404 Not Found | No active link for this externalTenantId | Verify the tenant ID and that it still has an active client link |
422 Unprocessable | Client has blockers | Check is-deletable first and resolve blockers |
See Error Handling for the full error response format.
API Keys
API keys are provided during partner onboarding and are environment-specific. Contact partnerships@debitura.com for setup.
See the Referral Partner API Reference for client onboarding, token generation, and revenue reporting, and the Customer API Reference for case submission and management.