Customers

Recording Payments

How money coming in from a credit customer is applied to their balance.

Last updated 2026-10-13

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

Requires subscriptioncustomer.payments1,500 IQD / month

Overview

A payment reduces what a customer owes. It is recorded against the customer, not against one invoice — the balance is a single running figure, so a payment simply brings it down.

Customers — Payments tab
Payments tab
Payments tab — The add-payment form above the history of previous payments with balances before and after.
  1. 1

    Open the customer

    Find them in the customer list and open their drawer.

  2. 2

    Go to the Payments tab

    The current balance is shown at the top so you can see what is outstanding before entering anything.

  3. 3

    Enter the amount

    Type what the customer is handing over. Part payments are normal — the balance simply goes down by that much. A payment is refused when the customer owes nothing.

  4. 4

    Add a note (optional)

    Worth using to record how it was paid, or which invoice the customer believes they are settling.

  5. 5

    Save

    The balance updates immediately and the payment appears in the history with the balance before and after.

    Customers — Payment recorded
    Payment recorded
    Payment recorded — The history showing the new entry and the reduced balance.

Payment fields

POST /api/v1/customers/{id}/payments
ParameterTypeRequiredDescription
customer_idintegerRequiredThe customer paying.
amountdecimalRequiredAmount received.
notesstringOptionalFree text — payment method, reference, or which invoice it is against.
sub_customer_idintegerOptionalThe customer's person this payment is for. Ignored without customer.sub_accounts.

The payment record

Each payment stores the balance on either side of it, so the history is auditable without recomputing anything.

ParameterTypeRequiredDescription
payment_idintegerOptionalIdentifier for the payment.
sale_idintegerOptionalLinked invoice, when the payment was taken against a specific sale.
amountdecimalOptionalAmount received.
payment_datetimestampOptionalWhen it was recorded.
balance_beforedecimalOptionalWhat they owed immediately before.
balance_afterdecimalOptionalWhat they owed immediately after.
user_initialsstringOptionalWho took the payment.
notesstringOptionalThe note recorded with it.
TipBecause balance_before and balance_after are stored on every row, a disputed balance can be walked back through the history one payment at a time rather than reconstructed from invoices.

Correcting a payment

A payment keyed with the wrong amount can be corrected. Press Edit on the payment, type the correct amount and, if useful, a note. The window shows what was recorded and how the balance will move.

  • The customer's balance changes only by the difference.
  • The payment keeps its original date.
  • A payment cannot be deleted — correct it instead.
PUT /api/v1/customers/{id}/payments/{paymentId}
ParameterTypeRequiredDescription
amountdecimalRequiredThe correct amount.
notesstringOptionalA note explaining the correction.

Marking a payment for a person

When the customer has sub-customers, a payment can be marked Forone of them, so it comes off that person's share. A payment marked for a person may not be more than that person owes.

Requires subscriptioncustomer.sub_accounts1,500 IQD / month

Receipts

A payment can be printed as a receipt for the customer, and shared as a link instead of printing.

Requires subscriptioncustomer.whatsapp_share2,000 IQD / month
NoteThe share link is a public tokenised address for that one document. Anyone holding the link can view it, so treat it as you would the printed receipt.

Payment requests from the portal

NoteThe payment-request feature (customer.payment_request) is no longer sold. Businesses that already hold it keep it; it cannot be newly subscribed.

Related