Billing Guide

Lifecycle States

What happens between a missed payment and a closed account, and how long you have at each step.

Last updated 2026-10-13

DigitalKey ERP — Docs · digital-key.co/docs/billing/lifecycle

The timeline

Account lifecycle
  User created
       │                                  lifecycle_status = registered
       ▼  first login
  Activated                               lifecycle_status = active
       │
       ▼  billing day arrives
  ┌────────────────────────────┐
  │ Balance covers the cost?   │
  └────────────┬───────────────┘
      yes      │      no
       │       └──────────────►  temp_suspend
       ▼                              │
  stays active                        ▼  after lifecycle_temp_suspend_days (5)
                                  suspend
                                      │
                                      ▼  after lifecycle_suspend_days (5)
                                  deactivated

  At temp_suspend or suspend: a top-up that covers the
  unpaid month collects it and reactivates the account.
Billing — Account status on My Account
Account status on My Account
Account status on My Account — The account state with the balance and the date the current state began.

The five states

Values of lifecycle_status
ParameterTypeRequiredDescription
registeredstateOptionalCreated but never signed in. Not yet billed for anything.
activestateOptionalNormal working state. Deductions are being met.
temp_suspendstateOptionalA deduction failed. The first grace period is running.
suspendstateOptionalThe first grace period expired. The second is running.
deactivatedstateOptionalBoth grace periods expired, or an administrator closed the account.

Which states can sign in

ParameterTypeRequiredDescription
registeredstateRequiredYes — signing in is what activates the account.
activestateRequiredYes.
temp_suspendstateRequiredYes. Full access continues throughout the grace period.
suspendstateOptionalNo. Sign-in is refused, and an open session is ended.
deactivatedstateOptionalNo. Sign-in is refused.
Suspend blocks accessA suspended user is refused at sign-in with a clear message, and a session that was already open stops working on its next request. Only temp_suspend is a grace period with access. The reason is shown only after the correct password, so it cannot be used to probe which accounts exist.

Grace periods

Platform settings, adjustable by an administrator
ParameterTypeRequiredDescription
lifecycle_temp_suspend_daysinteger= 5OptionalDays in temp_suspend before dropping to suspend.
lifecycle_suspend_daysinteger= 5OptionalDays in suspend before deactivation.
lifecycle_warning_balanceinteger= 20000OptionalBalance in IQD below which a low-balance warning is raised.
NoteWith the defaults you have ten days in total from the first failed deduction to deactivation. Both windows are counted from status_changed_at, which is the date shown on My Account.

Reactivation

There is no separate reactivation step. A top-up first collects the month that failed — in full — and only then restores a temp_suspend or suspend account to active. Paying late does not make the missed month free.

TipRecovery is a single action: credit enough balance to cover what is unpaid and the account comes back on its own. Nothing else needs doing.
ImportantA top-up smaller than what is owed does not reactivate. The money is kept on the balance, nothing is deducted, and the account stays suspended with the clock still running. Top up at least the unpaid amount.
NoteReactivation restores only the features the account still has. A feature an administrator removed while the account was suspended does not come back with it. An administrator or reseller can also reactivate a suspended user by hand; one who has never signed in goes back to registered, so billing still starts at first login.

Deactivation

When the second grace period expires, the account is deactivated: the status is set to deactivated, the account is marked inactive, and its feature subscriptions are disabled.

WarningDeactivation is the one state a top-up will not undo. Recovering a deactivated account needs an administrator or reseller to re-enable it and restore its features — the balance alone is not enough.

What is recorded

Every transition is written to the lifecycle log with the state moved from, the state moved to, and the reason — insufficient_balance, auto_daily_check, manual_suspend and so on. Timestamps are also stamped on the user record:

ParameterTypeRequiredDescription
activated_attimestampOptionalWhen the account first became active.
temp_suspended_attimestampOptionalWhen it entered temp_suspend.
suspended_attimestampOptionalWhen it entered suspend.
deactivated_attimestampOptionalWhen it was deactivated.
reactivated_attimestampOptionalWhen it was last brought back.
status_changed_attimestampOptionalWhen the state last changed. Grace periods are counted from here.

Demo accounts

NoteDemo tenancies are outside this cycle. They are never billed, and instead carry a trial expiry date — the first sign-in after it passes disables the account and reports the trial as expired.

Staying ahead of it

  • Check next_billing_at and your balance on My Account.
  • Act on a billing_deduction_failed notification the day it arrives.
  • Keep more than one month's cost in balance so a late top-up is not urgent.
  • Remember every user is billed separately — check the team, not just yourself.

Related