Skip to main content

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​

EnvironmentBase URL
Testhttps://testreferral-api.debitura.com
Productionhttps://referral-api.debitura.com

Customer API​

EnvironmentBase URL
Testhttps://testcustomer-api.debitura.com
Productionhttps://customer-api.debitura.com

White-Label Onboarding UI​

EnvironmentBase URL
Testhttps://testreferral.debitura.com
Productionhttps://referral.debitura.com

Client Application​

EnvironmentBase URL
Testhttps://testapp.debitura.com
Productionhttps://app.debitura.com

Environment Differences​

AspectTestProduction
Real collection activityNoYes
Emails sentSuppressed*Yes
Data persistenceMay be resetPermanent

*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: true on 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 onboardingDone through the API.
  • Public demo simulation. The test demo uses 123456 only 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 ordinary POST /clients accounts 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 stringSolution
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
  • IsAttributedClient is true (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​

StatusCauseSolution
403 ForbiddenProduction environmentOnly available on test
404 Not FoundNo active link for this externalTenantIdVerify the tenant ID and that it still has an active client link
422 UnprocessableClient has blockersCheck 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.