> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mangopay.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mangopay.com/_mcp/server.

# How Echo works

## Overview diagram

The diagram below gives an overview of how Echo works, focusing on the settlement of funds and reconciliation. The main sections of this guide are highlighted.

![](/_fern-files/mangopay.docs.buildwithfern.com/10b62a3dce07545a9550f1d605846673f4ce1ce1b2e84214c512f2e0542bded5/docs/assets/images/diagram_echo_settlement_light.svg)![](/_fern-files/mangopay.docs.buildwithfern.com/95d712a53752befbb28846a2ae1c92e1a523608436fd8dbfe0f0e517c5854073/docs/assets/images/diagram_echo_settlement_dark.svg)

## A. Declaration and capture

Your platform declares transactions as Intents, identified with the `ExternalProviderReference`.

Once created, an Intents' `Status` value is `AUTHORIZED` before being declared as `CAPTURED`. These Intents are not yet reconciled and the corresponding funds have not been received.

## B. Settlement file processing

When your platform uploads a [settlement file](/guides/echo/integration#send-settlement-files-to-manogpay) to Mangopay, the Echo system starts to parse the file.

Echo first checks that the file is valid (expected format, single currency, etc.). Once done, the `Status` becomes `CREATED`. If the file is not valid and the matching process cannot start, the `Status` becomes `FAILED` and the process stops for that file.

> **Note**
>
> **Note – Settlement data must match intent data**
>
> It is critical that the data in the settlement fil matches the intents that you declared. If provider IDs or amounts are not matched then the reconciliation will fail.
>
> You can monitor this by checking the settlement file `Status` and using the dedicated endpoint to check any settlement errors, [GET View validation errors for a Settlement](/api-reference/settlements/view-settlement-validations).
>
> You need to address any failures, errors, or partially matched funds to prevent any delays in payouts to sellers.

## C. Line matching

Once the file is validated, Echo proceeds to reconciliation.

Echo iterates through each transaction line of the file and attempts to match the  `ExternalProviderReference` to a corresponding unreconciled Intent declared previously.

### Fully successful matching

If a match is found for all lines, the Settlement `Status` changes to `PENDING_FUNDS_RECEPTION`.

At the same time, the associated Intent is updated:

* The `SettlementId` is linked in the Intent
* The `Status` of the Intent’s Capture becomes `SETTLED_NOT_PAID`
* The `Status` of any created Splits becomes `PENDING_FUNDS_RECEPTION`.

### Unsuccessful matching attempts

If a match is found for some lines of the file, the Settlement `Status` changes to `PARTIALLY_MATCHED`.

If no lines could be matched, the status becomes `UNMATCHED`.

In both `PARTIALLY_MATCHED` and `UNMATCHED` cases, no part of the Settlement is settled using any funds that may arrive on the Virtual Account.

These Settlements need to be re-uploaded so that they can be fully matched, using the [POST Update a Settlement and generate a new upload URL](/api-reference/settlements/update-settlement) endpoint.

## D. Funds reception

The final step is that Mangopay receives funds from your platform’s partner PSP to a dedicated Virtual Account and associated wallet.

When the system receives unallocated funds, it checks the amount with the oldest matched Settlement’s `ActualSettlementAmount`.

If the funds received are sufficient:

* The Settlement’s `Status` becomes `RECONCILED`
* The Intent’s Capture’s `Status` becomes `PAID`
* The `AvailableAmountToSplit` is populated with the received amount
* The Intent’s Splits become `AVAILABLE`

If the funds are not sufficient, the Settlement’s `Status` becomes `INSUFFICIENT_FUNDS`. These settlements remain unmatched and are retried when additional funds are received on the dedicated Virtual Account’s wallet.

So, when funds arrive on the virtual account, the system looks for the oldest Settlement that has a Status of `PENDING_FUNDS_RECEPTION` or `INSUFFICIENT_FUNDS` and settles it first, passing the object to `RECONCILED`.

## Settlement file state machine

The overall state machine for a Settlement object is below:

```mermaid actions={true}
%%{
  init: {
    'theme': 'base',
    'themeVariables': {
      'primaryColor': '#FFFFFF',
      'primaryTextColor': '#2D0F37',
      'primaryBorderColor': '#2D0F37',
      'lineColor': '#2D0F37',
      'secondaryColor': '#FFFFFF',
      'tertiaryColor': '#FFFFFF',
      'fontSize': '16px',
      'fontFamily': 'Inter'
    }
  }
}%%
flowchart LR
    START(["start"])
    FAILED(["FAILED"])
    CANCELLED(["CANCELLED"])
    RECONCILED(["RECONCILED"])
    PENDING_UPLOAD["PENDING_UPLOAD"]
    UPLOADED["UPLOADED"]
    CREATED["CREATED"]
    PENDING_FUNDS_RECEPTION["PENDING_FUNDS_RECEPTION"]
    UNMATCHED["UNMATCHED"]
    PARTIALLY_MATCHED["PARTIALLY_MATCHED"]
    INSUFFICIENT_FUNDS["INSUFFICIENT_FUNDS"]

    START --> PENDING_UPLOAD
    PENDING_UPLOAD --> UPLOADED
    UPLOADED --> CREATED
    UPLOADED --> FAILED
    CREATED --> PENDING_FUNDS_RECEPTION
    CREATED --> UNMATCHED
    CREATED --> CANCELLED
    UNMATCHED --> PARTIALLY_MATCHED
    PENDING_FUNDS_RECEPTION --> RECONCILED
    PENDING_FUNDS_RECEPTION --> INSUFFICIENT_FUNDS
    INSUFFICIENT_FUNDS --> RECONCILED
    UNMATCHED --> CANCELLED
    PARTIALLY_MATCHED --> PENDING_FUNDS_RECEPTION
    PARTIALLY_MATCHED --> CANCELLED

    style START stroke-width:3.5px
    style FAILED stroke-width:3.5px
    style CANCELLED stroke-width:3.5px
    style RECONCILED stroke-width:3.5px
    style PENDING_UPLOAD stroke-width:3.5px
    style UPLOADED stroke-width:3.5px
    style CREATED stroke-width:3.5px
    style PENDING_FUNDS_RECEPTION stroke-width:3.5px
    style UNMATCHED stroke-width:3.5px
    style PARTIALLY_MATCHED stroke-width:3.5px
    style INSUFFICIENT_FUNDS stroke-width:3.5px
```

```mermaid actions={true}
%%{
  init: {
    'theme': 'base',
    'themeVariables': {
      'primaryColor': "#090D0D",
      'primaryTextColor': "#FFFFFF",
      'primaryBorderColor': "#FFFFFF",
      'lineColor': "#FFFFFF",
      'secondaryColor': "#090D0D",
      'tertiaryColor': "#090D0D",
      'fontSize': '32px',
      'fontFamily': 'Inter'
    }
  }
}%%
flowchart LR
    START(["start"])
    FAILED(["FAILED"])
    CANCELLED(["CANCELLED"])
    RECONCILED(["RECONCILED"])
    PENDING_UPLOAD["PENDING_UPLOAD"]
    UPLOADED["UPLOADED"]
    CREATED["CREATED"]
    PENDING_FUNDS_RECEPTION["PENDING_FUNDS_RECEPTION"]
    UNMATCHED["UNMATCHED"]
    PARTIALLY_MATCHED["PARTIALLY_MATCHED"]
    INSUFFICIENT_FUNDS["INSUFFICIENT_FUNDS"]

    START --> PENDING_UPLOAD
    PENDING_UPLOAD --> UPLOADED
    UPLOADED --> CREATED
    UPLOADED --> FAILED
    CREATED --> PENDING_FUNDS_RECEPTION
    CREATED --> UNMATCHED
    CREATED --> CANCELLED
    UNMATCHED --> PARTIALLY_MATCHED
    PENDING_FUNDS_RECEPTION --> RECONCILED
    PENDING_FUNDS_RECEPTION --> INSUFFICIENT_FUNDS
    INSUFFICIENT_FUNDS --> RECONCILED
    UNMATCHED --> CANCELLED
    PARTIALLY_MATCHED --> PENDING_FUNDS_RECEPTION
    PARTIALLY_MATCHED --> CANCELLED

    style START stroke-width:3.5px
    style FAILED stroke-width:3.5px
    style CANCELLED stroke-width:3.5px
    style RECONCILED stroke-width:3.5px
    style PENDING_UPLOAD stroke-width:3.5px
    style UPLOADED stroke-width:3.5px
    style CREATED stroke-width:3.5px
    style PENDING_FUNDS_RECEPTION stroke-width:3.5px
    style UNMATCHED stroke-width:3.5px
    style PARTIALLY_MATCHED stroke-width:3.5px
    style INSUFFICIENT_FUNDS stroke-width:3.5px
```