Skip to main content

Client Lifecycle

A summary of how POST /clients responses are determined and how clients move through the onboarding process.

Response Codes

CodeMeaningNext Step
201Client ready (SDCA signed)Mint token, submit cases
202Onboarding required (SDCA not signed)Redirect user to onboarding URL
409Client already existsHandle based on conflictResponse.type

Key Behaviors

  • Idempotency — Calling POST /clients with the same externalTenantId returns the existing client state, not an error. Safe to retry.
  • Client detection — Debitura matches by email domain (company emails) or exact email (generic providers like gmail.com).
  • Multi-brand — Use Divisions for multiple brands under one parent. One client account, multiple divisions. See Client Divisions.
  • WithdrawalPOST /clients/{externalTenantId}/withdraw archives the link and closes all pending cases. Only works if all cases are in PendingContractSigning.

Full Implementation Guide

For the complete POST /clients workflow — request format, all response scenarios, detection algorithm, decision flow diagram, return URLs, error handling, and withdrawal — see:

Client Onboarding Guide

How isAttributedClient affects your revenue is covered in Attribution. For onboarding URL patterns and branding, see White-Label UI. For the withdrawal endpoint, see the API reference.