# Search outbound payments

Operation ID: `searchOutboundPayment`

Group: Accounting › Outbound Payments

[Open in the interactive reference](https://docs.api.lensing.ai/lensing/v1/endpoints/searchOutboundPayment)

`POST /accounting/outbound-payments/search`

Read-only: A read that takes its filters in the body. Changes nothing, and ignores Idempotency-Key.

Searches outbound payments, with their lines. Each match is the same record that GET accounting/outbound-payments/:id returns.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Api-Version` | header | string · 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`. |

## Request body

Required, `application/json`: searchOutboundPaymentInput.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `filters` | object | no | The filters to apply. An outbound payment must match every filter you send. Omit to return all outbound payments. Example: `{"applicationStatus":"unapplied"}`. |
| `filters.id` | string | no | Limits results to the outbound payment with this identifier. |
| `filters.outboundPaymentNumber` | string | no | Limits results to the payment with this number. |
| `filters.paymentId` | string | no | Limits results to payments with this bank or provider reference. |
| `filters.status` | string | no | Limits results to payments in this processing status. Any other value matches no payment. |
| `filters.approvalStatus` | string | no | Limits results to payments in this approval state. Any other value matches no payment. |
| `filters.applicationStatus` | string | no | Limits results by how much of the payment has been applied. Values include 'unapplied', 'partiallyApplied' and 'applied'. |
| `filters.paymentType` | string | no | Limits results to payments sent this way, for example 'ach', 'wire' or 'check'. |
| `filters.paymentCurrency` | string | no | Limits results to payments denominated in this currency. Format ISO 4217, for example 'USD'. |
| `filters.paymentAccountId` | string | no | Limits results to payments made from this bank general ledger account. See id on GET accounting/accounts/:id. |
| `filters.entityId` | string | no | Limits results to payments made by this legal entity. See id on GET base/entities. |
| `filters.entityName` | string | no | Limits results to payments made by the legal entity with this name. The match is exact. Use entityId when you already have the id. |
| `filters.origin` | string | no | Limits results to payments created by this source system. The match is exact. |
| `filters.externalId` | string | no | Limits results to payments with this upstream identifier. It is not unique, so this can match several payments. |
| `page` | object | no | Pagination controls. Omit for the first page. Example: `{"size":50}`. |
| `page.cursor` | string | no | The cursor from the previous response's pagination.nextCursor. Omit on the first request. |
| `page.size` | number | no | The number of payments per page. Defaults to 50, and a value above 200 is treated as 200, not rejected. |

```json
{
  "filters": {
    "applicationStatus": "unapplied"
  },
  "page": {
    "size": 50
  }
}
```

## Response

`200` Success

Under `data` (searchOutboundPaymentOutput):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | array<object> | yes | The outbound payments on this page, most recently created first. An empty array when nothing matches. |
| `items[].id` | string | yes | The unique identifier for the outbound payment. |
| `items[].outboundPaymentNumber` | string | no | The outbound payment number. Absent until a number has been assigned. |
| `items[].description` | string | no | A description of the payment. |
| `items[].paymentDate` | date | yes | The date the payment was made. Format YYYY-MM-DD. |
| `items[].paymentCurrency` | string | yes | The currency the payment is denominated in. Format ISO 4217, for example 'USD'. Governs totalPaid, appliedAmount and unappliedAmount. |
| `items[].paymentType` | string | yes | How the money was sent, for example 'ach', 'wire' or 'check'. |
| `items[].status` | string | yes | The processing status of the payment. |
| `items[].approvalStatus` | string | no | Where the payment sits in the approval workflow. |
| `items[].applicationStatus` | string | no | How much of the payment has been applied to bills. Values include 'unapplied', 'partiallyApplied' and 'applied'. |
| `items[].totalPaid` | decimal | no | The total amount paid, in the payment currency. |
| `items[].appliedAmount` | decimal | no | The portion already applied against vendor bills, in the payment currency. |
| `items[].unappliedAmount` | decimal | no | The portion not yet applied to any bill, in the payment currency. |
| `items[].bankCurrency` | string | no | The currency of the bank account the money left, when it differs from the payment currency. Format ISO 4217, for example 'USD'. |
| `items[].paymentId` | string | no | The payment reference assigned by the bank or payment provider. |
| `items[].externalId` | string | no | The identifier this payment has in the upstream system that produced it. It is not unique. |
| `items[].externalUrl` | string | no | A link to the payment in an external system, when one is stored. |
| `items[].origin` | string | no | The source system this payment came from. Recorded when an integration created the payment. |
| `items[].singlePayment` | boolean | no | Whether the payment covers a single bill rather than a batch. |
| `items[].paymentAccountId` | string | no | The bank general ledger account the money left. See id on GET accounting/accounts/:id. |
| `items[].paymentAccountName` | string | no | The name of the bank general ledger account the money left. |
| `items[].entityId` | string | no | The legal entity that made the payment. See id on GET base/entities. |
| `items[].entityName` | string | no | The name of the legal entity that made the payment. |
| `items[].lastModifiedDate` | date-time | yes | The date and time the payment last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
| `items[].lines` | array<object> | no | The payment lines, one per payee or bill covered. An empty array when the payment has none. |
| `items[].lines[].id` | string | yes | The unique identifier for the line. |
| `items[].lines[].lineNumber` | string | no | The line number. |
| `items[].lines[].description` | string | yes | A description of the line. |
| `items[].lines[].amount` | decimal | no | The amount paid on this line, in the line currency. |
| `items[].lines[].currency` | string | yes | The currency for the line. Format ISO 4217, for example 'USD'. |
| `items[].lines[].paymentDate` | date | no | The date this line was paid, when it differs from the header. Format YYYY-MM-DD. |
| `items[].lines[].paymentType` | string | no | How this line was sent, for example 'ach', 'wire' or 'check'. |
| `items[].lines[].receiverName` | string | yes | The name of the payee. |
| `items[].lines[].receiverAccount` | string | no | The payee bank account number. It is returned here and on search but never on the collection endpoint and never filterable. |
| `items[].lines[].receiverBankCode` | string | no | The payee sort or routing code. It is returned here and on search but never on the collection endpoint and never filterable. |
| `items[].lines[].customReference` | string | no | A reference you supplied, carried on the line. |
| `pagination` | object | yes | The pagination details for this page. |
| `pagination.nextCursor` | string | no | The cursor for the next page. Pass it as page.cursor. Absent on the last page. |
| `pagination.hasMore` | boolean | yes | True when more matches remain beyond this page. |

```json
{
  "data": {
    "items": [
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "outboundPaymentNumber": "<outboundPaymentNumber>",
        "description": "<description>",
        "paymentDate": "2026-01-15",
        "paymentCurrency": "<paymentCurrency>",
        "paymentType": "<paymentType>",
        "status": "<status>",
        "approvalStatus": "<approvalStatus>",
        "applicationStatus": "<applicationStatus>",
        "totalPaid": "19.99",
        "appliedAmount": "19.99",
        "unappliedAmount": "19.99",
        "bankCurrency": "<bankCurrency>",
        "paymentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "externalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "externalUrl": "<externalUrl>",
        "origin": "<origin>",
        "singlePayment": true,
        "paymentAccountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "paymentAccountName": "<paymentAccountName>",
        "entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "entityName": "<entityName>",
        "lastModifiedDate": "2026-01-15T09:30:00.000Z",
        "lines": [
          {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "lineNumber": "<lineNumber>",
            "description": "<description>",
            "amount": "19.99",
            "currency": "<currency>",
            "paymentDate": "2026-01-15",
            "paymentType": "<paymentType>",
            "receiverName": "<receiverName>",
            "receiverAccount": "<receiverAccount>",
            "receiverBankCode": "<receiverBankCode>",
            "customReference": "<customReference>"
          }
        ]
      }
    ],
    "pagination": {
      "nextCursor": "<nextCursor>",
      "hasMore": true
    }
  },
  "diagnostics": [
    {
      "code": "<code>",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": "<details>"
    }
  ]
}
```

## Statuses

- `400` — Invalid request or business failure
- `401` — The request carries no valid access token.
- `403` — Not authorized
- `404` — Not found
- `429` — Too many requests from this client address. The response has no body and no `Retry-After` header.
- `500` — Internal server error
