# Apply Credit Automatically on Payments

To use this functionality:&#x20;

#### 1. Create Payment&#x20;

Go to Actions on Customer and select ‘Receive Payment’.&#x20;

#### 2. Select Credit Notes and Invoices&#x20;

a. On the Allocate Credit tab, select which credit notes to allocate.&#x20;

* The user can edit the ‘Amount to Allocate’ column.&#x20;

b. On the Invoices tab,  select which invoices to pay.&#x20;

* The ‘Available Credit’ field indicates the available amount to use.
* The user can edit both the ‘Amount to Credit’ and ‘Amount to Pay’ columns.&#x20;
* The ‘Remaining’ Column is automatically updated.&#x20;

#### 3. Click ‘Apply Credit’ on Action Bar&#x20;

* If credit note(s) do not fully cover the invoice amount then the ‘Amount to Pay’ column will show the value left to pay.&#x20;
* If credit note(s) fully cover the value of the invoice, the value in the ‘Amount to Pay’ column will be 0.00.&#x20;
* If credit note(s) exceed all invoices, "Amount to Pay", leftover credit will be shown as "Unused credit".&#x20;
* Credit notes will be applied to the Invoices from the top to bottom of the list. If the credit amount is not enough to cover the full value of all selected invoices, invoices at the bottom of the list will be either partially allocated or not allocated at all.&#x20;

If the credit allocation is successful, a message will let the user know that the “Credit has been applied”.&#x20;

#### Edit and Delete

Users may edit documents by using the edit button at the top of the page. The "Amount to Allocate" column can be edited to change how much of the credit note is allocated to invoices. Users can also remove credit notes from allocation by unchecking boxes on the tab.&#x20;

To delete, users can go to Actions and select "Delete" or "Void this Document" from the list.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://helpwith.salesorder.com/sales/payments-from-customers/apply-credit-automatically-on-payments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
