# Payments

> Receive money from customers and pay suppliers, allocate payments to documents, hold advances, and settle in another currency.

A **Payment Entry** records money moving through a bank or cash account: a customer paying you, or you paying a supplier. It then **allocates** that money to the invoices or bills it settles. One payment can settle several documents, part of a document, or nothing yet (an advance).

## Record a payment

The quickest way is from the document: click **Record payment** on a posted invoice or bill (or **Record refund** on a credit). A new payment opens with the party, the amount, and the currency already filled in, and the amount allocated to that document (to its open installments, earliest due first, if it has a payment schedule).

To start from scratch, open **Accounting → Payments** and click **New payment**:

1. **Payment type**: **Receive** (money in) or **Pay** (money out).
2. **Party type** (**Customer company**, **Individual customer**, or **Supplier**) and **Party**.
3. **Payment date** and **Bank/Cash account**.
4. **Currency**, **Exchange rate** (for a foreign currency), and **Payment amount**.
5. Optionally a **Reference number**, **Reference date**, and **Memo**.
6. Allocate the amount under **Allocate to open documents** (see below).
7. Click **Save draft**, then **Post payment**.

Posting writes the bank movement and the allocations to the ledger. The payment number is assigned when the draft is first saved.

Receiving from a customer and paying a supplier are the usual cases. **Pay** to a customer refunds a credit note, and **Receive** from a supplier records a refund of a vendor credit.

## Allocations

The **Allocate to open documents** table lists the party's open invoices or bills. Documents with installments show one row per installment.

- With **Payment allocation** set to **Automatic · Earliest due first** (the default, under **Accounting settings → General**), the amount is spread over the earliest due documents first. You can change any row.
- With **Manual**, you type each allocation.
- In either mode, **Allocate payment** fills the rows by earliest due date.

The **Payment summary** shows how much is **Allocated**, any **Deductions**, and the **Unallocated advance**. You cannot allocate more than the payment or more than a document's outstanding balance.

For example, a customer pays 5,000 against two invoices of 3,000 and 4,000. Automatic allocation settles the older 3,000 invoice in full and puts 2,000 on the second, which stays open with 2,000 due.

### Deductions and charges

Use **Deductions and charges** when the money that arrived differs from what the documents say, for example a 25 bank fee taken from a customer transfer. Add a row with the fee account, **Debit** or **Credit**, and the amount. The invoice is settled in full and the fee is recorded as an expense.

## Advances

Money you do not allocate is held as an **advance**: a customer prepayment or a supplier deposit. It posts to the customer or supplier advances account and is shown as **Unallocated** in the payments list.

To use it later, open the posted payment and click **Allocate advance**. The dialog lists the party's open documents, with one row per installment. Enter amounts, or click **Allocate by due date** to fill them earliest due first, then click **Apply advance**. The application is dated today.

For a document in another currency, the dialog shows the same **Settles** column and **Expected FX gain** or **Expected FX loss** as a new payment (see [Settling a document in another currency](#settling-a-document-in-another-currency)).

## Cancel a payment

**Cancel payment** on a posted payment reverses all of its ledger effects and restores the balance of every document it settled. The reversal is dated today, and the original stays as history. Drafts can be deleted instead.

While a posted payment is allocated to an invoice or bill, that document cannot be voided, cancelled, or edited. Cancel the payment first.

## Foreign currency

### Exchange rates by document date

Invoices, bills, and payments all use the same rule: the exchange rate defaults to the latest recorded rate **on or before the document's date**. A payment dated 15 March uses the rate recorded for 15 March (or the last one before it), not today's rate. You can type a different rate; the hint shows whether the rate was recorded or entered manually.

Record dated rates under **Settings → Finance → Currencies**. If no rate exists on or before the date, Workstation warns you and uses the current rate.

### Which bank account you can use

The bank or cash account must be in the payment's currency or in the base currency. For example, a USD payment can go through a USD bank account or a base-currency SAR account, but not a EUR account.

### Settling a document in another currency

A payment can settle a document in a different currency. For example, you receive SAR into your SAR bank for an invoice raised in USD.

When the payment and the document currencies differ, the allocation table shows a **Settles (SAR)** column. The allocation is entered in the document's currency (how much of the USD invoice is paid), and **Settles** is how much of the SAR payment that uses. Settles is filled in from the dated rates and can be adjusted to what the bank actually converted.

### Exchange gain or loss

A foreign-currency document is cleared at the rate it was posted with, while the bank moves at the payment's rate. The difference is a realized exchange gain or loss, posted to **FX Gain/Loss**. The payment summary shows it as **Expected FX gain** or **Expected FX loss** before you post.

For example, you post a 1,000 USD invoice at 3.75 (3,750 SAR receivable). The customer pays 1,000 USD when the rate is 3.76. The bank receives 3,760 SAR, the receivable is cleared at 3,750 SAR, and 10 SAR posts to FX Gain/Loss as a gain.

## Undeposited Funds

If **Customer receipt routing** is set to **Undeposited Funds** (under **Accounting settings → General**), customer receipts post to the Undeposited Funds account instead of the bank or cash account chosen on the payment. You then group them into a bank deposit. See [Undeposited funds and deposits](https://workstation.repzo.com/docs/commerce/accounting/banking#undeposited-funds-and-deposits).

## Holds

A supplier on a **Payments only** or **Bills and payments** hold cannot be paid. Refunds received from a supplier are never blocked. A customer credit hold does not block receiving money. See [Supplier holds](https://workstation.repzo.com/docs/commerce/accounting/purchases#supplier-holds).

## Payments recorded in the CRM

Payments recorded on an invoice's **Payment** tab in **Commerce → Invoices** also post to the ledger when Accounting is enabled, and settle the same invoice. Use Payment Entries when you need allocations across several documents, advances, deductions, or foreign-currency settlement.

## Opening advances

To bring a customer or supplier advance into your opening books, use **Opening balances → Customer and supplier advances**. It opens a **New opening payment** that posts on the accounting start date and stays available as an advance. See [Opening balances](https://workstation.repzo.com/docs/commerce/accounting/ledger#opening-balances).

## Related pages

- [Sales](https://workstation.repzo.com/docs/commerce/accounting/sales)
- [Purchases](https://workstation.repzo.com/docs/commerce/accounting/purchases)
- [Banking](https://workstation.repzo.com/docs/commerce/accounting/banking)
- [Receivables and payables aging](https://workstation.repzo.com/docs/commerce/accounting/reports#receivables-and-payables-aging)
