> ## Documentation Index
> Fetch the complete documentation index at: https://docs.finosu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Confirm ACH Settlement

## Overview

This endpoint receives ACH settlement confirmation from external loan management systems (LMS) and marks the corresponding ACH payment as COMPLETED and payment transaction as SUCCESSFUL.

**Note:** For submitting multiple ACH confirmations in a single request, use the [batch endpoint](./batch.mdx).

## ID Mapping

The endpoint uses reference IDs to locate records:

* **customer\_id** - Your customer reference ID
* **loan\_id** - Your loan reference ID
* **payment\_id** - Your payment reference ID

## Request Body Fields

### Identifiers (Required)

* **customer\_id** - Customer reference ID from your LMS
* **loan\_id** - Loan reference ID from your LMS
* **payment\_id** - Payment reference ID from your LMS

### Settlement Fields

* **settlement\_date** - Date the ACH payment settled

## What the Endpoint Does

When you submit ACH settlement confirmation, Finosu:

1. **Locates the records** using the external reference IDs

2. **Updates AchPayment** with:
   * Status set to COMPLETED
   * Settlement date (if provided)

3. **Updates PaymentTransaction** with:
   * Status set to SUCCESSFUL

## Response

The endpoint returns a success response:

* **success** - Boolean indicating success
* **message** - Success or error message

## Example Usage

This endpoint is typically called by external LMS systems when they confirm that an ACH payment has successfully settled at the bank.

## Error Handling

The endpoint will return appropriate HTTP status codes:

* **200 OK** - Successfully confirmed ACH settlement
* **400 BAD REQUEST** - ACH payment does not belong to specified loan
* **404 NOT FOUND** - Customer, loan, or payment not found with provided IDs
* **409 CONFLICT** - Multiple ACH payments found with the same processor transaction ID
* **500 INTERNAL SERVER ERROR** - Server error during processing
