# Payments

`GET /accounting/payments`

Group: Accounting › Payments · Operation ID: `payments`

Returns a list of payments, each with its amounts. For the customer, entity and account references, the payment reference and the note, use GET accounting/payments/:id or POST accounting/payments/search.

[Open in the interactive reference](https://docs.api.lensing.ai/?op=payments)

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Api-Version` | header | `"v1"` | yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version `v1`. |

## Query surface

- `id` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `paymentDate` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `paymentType` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `currency` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `customerPaymentStatus` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `disputeStatus` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- `lastModifiedDate` — filter by eq, ne, gt, gte, lt, lte, in, notIn, between, like
- Orderable: id, paymentDate, paymentType, currency, customerPaymentStatus, disputeStatus, amount, unappliedAmount, lastModifiedDate
- Selectable: id, paymentNumber, paymentDate, paymentType, currency, paymentAccountCurrency, exchangeRate, amount, appliedAmount, unappliedAmount, refundAmount, bankFeeAmount, smallBalanceWriteOffAmount, totalEarlyPaymentDiscount, customerPaymentStatus, disputeStatus, customerName, accountName, lastModifiedDate

## Response

`200` Success

Under `data`, an array of paymentsRow:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | no | The unique identifier for the payment. |
| `paymentNumber` | string or null | no | The payment number, unique within the tenant. A human-readable reference used for reconciliation. |
| `paymentDate` | string (date) | no | The date the payment was made. Format YYYY-MM-DD. |
| `paymentType` | string | no | The payment method. Possible values: 'check', 'ach', 'wire', 'creditCard', 'directDebit', 'sepaCreditTransfer'. |
| `currency` | string | no | The currency the customer paid in. Every amount on the payment is in this currency. Format ISO 4217, for example 'USD'. |
| `paymentAccountCurrency` | string or null | no | The currency of the bank account the payment was received into. Present only when it differs from the payment currency. Format ISO 4217, for example 'USD'. |
| `exchangeRate` | string (decimal) or null | no | The rate used to convert the payment currency to the entity's functional currency. A ratio, not an amount, with no currency of its own. |
| `amount` | string (decimal) or null | no | The amount paid, in the payment currency. |
| `appliedAmount` | string (decimal) or null | no | The portion already applied to invoices, in the payment currency. The sum of the payment's applications. |
| `unappliedAmount` | string (decimal) or null | no | The portion not yet applied to any invoice, in the payment currency. unappliedAmount = amount - appliedAmount - refundAmount. |
| `refundAmount` | string (decimal) or null | no | The portion refunded through approved refunds, in the payment currency. |
| `bankFeeAmount` | string (decimal) or null | no | The bank fee deducted from the payment, in the payment currency. |
| `smallBalanceWriteOffAmount` | string (decimal) or null | no | The total written off as a small residual balance across the payment's applications, in the payment currency. |
| `totalEarlyPaymentDiscount` | string (decimal) or null | no | The total early-payment discount granted across the payment's applications, in the payment currency. |
| `customerPaymentStatus` | string or null | no | The derived lifecycle status of the payment. Possible values: 'unapplied', 'partiallyApplied', 'appliedInFull', 'partiallyRefunded', 'refunded', 'disputed', 'chargedBack'. |
| `disputeStatus` | string or null | no | The dispute state of the payment. Possible values: 'disputed', 'chargedBack'. Absent on an undisputed payment. |
| `customerName` | string or null | no | The name of the customer the payment came from. |
| `accountName` | string or null | no | The name of the ledger account the payment was posted to. |
| `lastModifiedDate` | string (date-time) | no | The date and time the payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |

## Statuses

- `400` — Invalid request or business failure
- `401` — Missing or invalid access token
- `403` — Not authorized
- `404` — Not found
- `429` — Too many requests
- `500` — Internal server error
