# Posted Customer Payments _(Realtime-enabled)_

`GET` _(Table: EONE Posted Ledger Doc)_

```
eOne/core/v1.0/postedCustomerPayments
```

Read-only posted customer payments, a **webhook source** for status writeback: subscribe to be pushed the moment a payment posts to the customer ledger. The `applications` child reports which invoices the payment settled and each one's resulting balance, so a partial payment is a single event here.

## The settlement-truth feed

This feed is where payment/settlement status lives. When a payment posts, fully or partially, you are pushed one notification on **postedCustomerPayments**. `$expand=applications` (or GET `postedCustomerPayments({id})/postedDocApplications`) to see, per settled invoice, the `appliedAmount`, the invoice's **resulting** `appliedRemainingAmount`, and `appliedOpen`. So a $30 payment against a $100 invoice tells you "invoice now $70 outstanding"; the next $70 payment tells you "paid in full", **without the invoice feed re-firing**.

Late application (a payment posted unapplied, then applied via Apply Entries) re-fires this payment, never the invoice feed.

## Subscribing

Register a subscription against the entity set; Business Central notifies your endpoint when a row changes. The notification carries the record id. GET it to read the current values.

```
POST /subscriptions
{
  "resource": "/postedCustomerPayments",
  "notificationUrl": "https://your-endpoint",
  "clientState": "<secret>"
}
```

## Status

`status` is the human-readable settlement state (**Open**, **Partially Settled**, or **Settled**) computed from the ledger entry, so you write status back without interpreting raw open/remaining-amount semantics. `remainingAmount` and `settledAmount` carry the figures behind it.

> **Note:** These feeds are projected from the customer/vendor ledger by a background job (enable **Posted Document Events** on the eOne Integration Setup page). The base ledger tables are not change-tracked, so posting stays fast; notifications arrive on the next projection run.

## Retention

The projection is a short-lived event feed, not a store: rows are purged by the background job once their posting date is older than the configured retention window, **7 days by default** (options 7, 14, 28 on the setup page, or via the `integrationSetup` API). The backfill only seeds documents within that window, and a purge sends subscribers a delete notification. Consume and reconcile within the window.

## Posted Customer Payments fields

_API column → BC field._

**Legend**

- _(req)_ required on create
- _(res)_ resolver
- _(cur)_ currency-translated
- _(ro)_ read-only
- _(ext)_ added to this endpoint by another extension (BC field name shown; its API column name is not known here)

| API | BC field | Notes |
| --- | --- | --- |
| `id` | SystemId | BC record GUID. _(ro)_ |
| `bcCompanyId` | bcCompanyId | The company this row belongs to - the same GUID that appears in the request URL. Present on every endpoint so a store pooling several companies can keep them apart without relying on which URL it called. _(ro)_ |
| `bcCompanyName` | bcCompanyName | The name of the company this row belongs to. _(ro)_ |
| `integrationId` | Integration Id | Originating payment's eOne integration key. _(ro)_ |
| `documentNumber` | Document No. | Posted payment document number. _(ro)_ |
| `externalDocumentNumber` | External Document No. | _(ro)_ |
| `customerNumber` | Party No. | Customer the payment posted against. _(ro)_ |
| `customerIntegrationId` | Party Integration Id | The customer's eOne integration key. _(ro)_ |
| `postingDate` | Posting Date | _(ro)_ |
| `documentDate` | Document Date | _(ro)_ |
| `currencyCode` | currencyCode | ISO code; blank is LCY. _(cur)_ |
| `originalAmount` | Original Amount | Full payment amount. _(ro)_ |
| `amount` | Amount | _(ro)_ |
| `remainingAmount` | Remaining Amount | Unapplied balance of the payment. _(ro)_ |
| `settledAmount` | Settled Amount | Amount of the payment that has been applied. _(ro)_ |
| `status` | Status | Open, Partially Settled or Settled. _(ro)_ |
| `closedDate` | Closed Date | _(ro)_ |
| `transactionNumber` | Transaction No. | _(ro)_ |
| `createdDateTime` | SystemCreatedAt | _(ro)_ |
| `lastModifiedDateTime` | SystemModifiedAt | Changes here fire the webhook. _(ro)_ |

## Related pages

Collections nested under this endpoint:

- [Posted Document Applications](https://eonesolutions.github.io/eone-bc-integration/core-postedDocApplications.md)
