Customers

Adding Customers

Creating a customer record, and the three money fields that are easy to mix up.

Last updated 2026-10-13

DigitalKey ERP — Docs · digital-key.co/docs/customers/add-customer

Requires subscriptioncustomer.manage3,000 IQD / month
  1. 1

    Open the customer form

    Go to Customers and choose Add Customer.

    Customers — Customer list with the add button
    Customer list with the add button
    Customer list with the add button — The customer screen showing where a new record is started.
  2. 2

    Enter their details

    Only the name is required. A phone number is worth adding — it is how customers are searched at the counter and how a portal login is issued.

    Customers — Customer form
    Customer form
    Customer form — Name, phone, email, address, payment type and the debt fields.
  3. 3

    Choose the payment type

    Cash or postpaid. This sets the default offered at the counter; the cashier can still choose either on any given sale.

  4. 4

    Record any existing debt

    If this customer already owes you from before, put that figure in old debt so it is tracked without inventing invoices for it.

  5. 5

    Save

    The customer can be attached to sales straight away.

Customer fields

POST /api/v1/customers
ParameterTypeRequiredDescription
namestringRequiredCustomer or business name. The only required field.
phonestringOptionalPhone number. Used for counter search and portal sign-in.
emailstringOptionalEmail address.
addressstringOptionalPhysical address. Appears on statements.
payment_typestring= cashRequiredDefault payment type — cash or postpaid.
opening_debtdecimalOptionalBalance the account is opened with.
old_debtdecimalOptionalDebt carried over from your previous system, tracked separately from trading debt.
credit_limitdecimal= 0OptionalMaximum they may owe. 0 means unlimited. Enforced on postpaid sales.
next_payment_datedateOptionalWhen they are expected to pay. Drives the debt schedule.
notesstringOptionalInternal notes. Not shown to the customer.

Cash versus postpaid

NoteA cash customer pays at the time of sale. A postpaid customer can take goods and settle later, with the unpaid balance tracked on their account. The setting here is a default, not a restriction — see Postpaid Sales.

The three money fields

opening_debt, old_debt and current_balance are related but distinct, and getting them the wrong way round makes reporting confusing later:

  • opening_debt — what the account starts at when you create it.
  • old_debt — legacy debt from before this system. Reported separately so migrated balances never look like recent trading.
  • current_balance — maintained by the system as sales and payments happen. Not something you type.
Requires subscriptioncustomer.old_debt10,000 IQD / month

Credit limit

A limit of 0 means unlimited, and that is the default. Any other value is the amount you consider acceptable for them to owe.

The limit is enforcedA postpaid sale or a sales order being completed is refusedwhen it would take the customer's balance past the limit — at the POS, on sales orders, when a finished invoice is edited, and when a voided sale is restored. It is checked on the server and applies to the owner too. Cash sales are never blocked. The drawer shows the limit beside the balance, with the credit still available.

Expected payment date

TipSetting next_payment_date is what puts a customer onto the debt schedule in a useful position. Without it they still appear as a debtor, but with no date to sort or chase by.

Related