# Find The Deposit That Paid It

> Solarium docs, Invoices. All requests are `POST https://api.trysolarium.com/graphql/` with `Authorization: Bearer <api key>` and a JSON body `{"query": ..., "variables": ...}`. Every query and mutation takes an `organizationId` (find it with `myOrganizations`). Index of all pages: https://trysolarium.com/llms.txt

Bank deposits that could have paid an invoice, best first: exact amounts first, then payers whose name looks like the customer's. Includes deposits still in review, ones booked as income in Solarium only (that income booking is undone when you link it, so it isn't counted twice), and payments already booked as a transfer into a bank (linked in place). Link one with record_invoice_payment, passing its event_id as source_event_id. Read only.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `params.invoice_id` | `String!` | Yes | The invoice |

### Request

```graphql
query {
  previewOp(organizationId: "a1b2c3d4-...", name: "invoice_deposit_matches", params: { invoice_id: "9f3c..." }) { result }
}
```

### Response

```json
{
  "data": { "previewOp": { "result": { "summary": "2 Deposit(s) Could Have Paid INV-00024, 1 Exactly." } } }
}
```
