SolariumSolariumDocs
Browse The Docs

Docs/API Reference/Transactions

POST

Pay Supplier Bills

Pays open bills, all or part, from a bank account or credit card: DR Accounts Payable for each bill / CR the bank or card. The expense was booked with the bill, so this never touches profit and loss. Several bills of one vendor can be paid at once: split as you give it (allocations), else oldest bill first. With QuickBooks connected it becomes one Bill Payment with a line per bill, and each bill's balance is read back. Pass source_event_id to use the withdrawal already on the bank feed: that line becomes the payment, so it isn't counted twice. A USD bill can be paid from a USD account (valued at the bank line, else the day's Bank of Canada rate) or from an account in your books' currency (what left the bank: the bank line, amount_home, else the day's rate). Each bill's A/P comes down at the rate it was booked at, and the last payment leaves exactly 0. The difference goes to Exchange Gain or Loss. Refused for more than what's owed, a bill already paid, bills of different vendors, A/P accounts or currencies, an account in a third currency, or a date in a closed period.

Parameters

organizationIdUUID!required

Organization ID

nameString!required

"record_bill_payment"

params.bill_idString

The bill's Solarium event id, or its QuickBooks Bill Id

params.bill_ids[String]

Several bills of one vendor, paid at once

params.allocations[Object]

Each: bill_id, amount (in the bill's currency). Default: oldest bill first

params.amountString

In the bills' currency. Default: the bank line's amount, else everything owed

params.amount_homeString

A bill in another currency paid from an account in your books' currency: what left the bank, in your books' currency

params.paid_onDate

Default: the bank line's day, else today

params.bank_account_idString

The bank or credit card it was paid from (not needed with source_event_id)

params.source_event_idString

The bank-feed withdrawal for this payment, still in review

params.vendorString

Who you mean to pay. Refused if it isn't the bill's vendor

params.referenceString

Optional, like a confirmation number

applyBoolean

true to record it

Request
mutation {
  runOp(organizationId: "a1b2c3d4-...", name: "record_bill_payment", apply: true,
        params: { bill_ids: ["2379", "2401"], source_event_id: "e5f6..." }) { success applied result }
}
Response
{
  "data": { "runOp": { "success": true, "applied": true, "result": {
    "summary": "CAD 400.21 Paid To Harbourview Payroll Remittance (Business Chequing, 2026-07-15) From The Bank Line. Bill SD-2379 220.21 Paid In Full. Bill SD-2401 180.00 Paid In Full.",
    "data": { "payment_id": "7d21...", "amount": "400.21", "fx_difference": "0.00" }
  } } }
}