# Record A Payment

> 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

All or part of what's owed. DR the bank / CR the customer's A/R. Pass source_event_id to use a bank-feed deposit. A payment already booked (as a transfer, or a deposit already in QuickBooks) becomes the payment in place and is never booked twice. Its credit moves to this customer's A/R, so A/R with no customer clears. Money credited to another account is moved to A/R in Solarium only, and is refused when that entry is in QuickBooks. It must be in the invoice's currency, for the same customer or none, no more than what's owed, and not already another invoice's. QuickBooks isn't changed.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `params.invoice_id` | `String!` | Yes | The invoice |
| `params.method` | `String!` | Yes | One of your country's payment methods (invoice_settings: payment_methods). Canada: etransfer, cheque, bank, card, cash, wire, other. US: ach, cheque (shown as Check), zelle, wire, card, cash, other |
| `params.amount` | `String` | No | Default: what's left |
| `params.bank_account_id` | `String` | No | Where it landed (not needed with source_event_id) |
| `params.source_event_id` | `String` | No | A deposit from the bank feed. It's booked as this payment whole, so it must be the same amount (in the invoice's currency) or, for another currency, what landed. An entry already booked is linked in place: its own date, bank and amount |
| `params.amount_home` | `String` | No | Invoices in another currency paid into an account in your books' currency: what landed, in that currency. Leave it out for an account in the invoice's currency. Default: amount at that day's Bank of Canada rate. The difference goes to Exchange Gain or Loss |
| `params.fee` | `String` | No | Invoices in another currency: a bank fee taken off the payment, in the currency of the account it landed in. Goes to Bank Fees & Charges |

### Request

```graphql
mutation {
  runOp(organizationId: "a1b2c3d4-...", name: "record_invoice_payment", apply: true,
        params: { invoice_id: "9f3c...", method: "etransfer", source_event_id: "e5f6..." }) { success result }
}
```

### Response

```json
{
  "data": { "runOp": { "success": true, "result": { "summary": "1130.00 Recorded On INV-00024 (e-Transfer). Paid In Full." } } }
}
```
