Payment
ResponseMoney that moved, and the one document it settled. A receipt that paid several documents is one payment per document, sharing transaction_id. amount and currency are the money that actually moved; what it settled of the document, in the document's currency, is the allocation's amount.
Returned in responses. Its enums are open: tolerate values not listed here, which later versions may add.
Attributes
18Money in (a customer pays a sales invoice, a supplier refunds a purchase) or out (a purchase invoice is paid, a customer is refunded). Named, never implied by a sign.
Known values (open: expect new ones) incoming, outgoing
The money that moved, in currency: always positive, direction says which way it went. For a payment in the document's currency it equals the allocation's amount.
Currency of amount, the money that moved (ISO 4217): that of the bank or cash account. It is the document's currency unless a payment in another currency settled the document.
amount in the organization's book currency, positive: what the ledger moved. Equals amount when currency is the book currency; null for a payment in another currency that has no book value yet.
How it was paid. bank_transfer and cash move money through a bank or cash account. offset is a leg of a settlement that nets documents against each other, no money moving; bank_difference the small difference a bank payment left, written off to an account.
Known values (open: expect new ones) bank_transfer, cash, offset, bank_difference
Details
Only bank_transfer and cash can be recorded with createPayment.
The bank account the money moved on: the account of the bank line it reconciles, or of the ledger account a bank transfer posted to. Null for cash, an offset or a written-off difference.
Who paid or was paid, the contact of the document settled.
The document this payment settles, with the amount applied.
6 attributes of each item
Kind of document settled. New values may be added: treat a value you do not know as valid, not as an error.
Known values (open: expect new ones) sales_invoice, purchase_invoice
Amount applied to the document, positive, in the document's currency (not necessarily the currency of the money that moved, the payment's currency).
The document's own exchange rate, the one its book value was booked at: document-currency units per 1 book-currency unit. 1 for a document in the book currency; null when the document has no rate.
amount in the book currency at the document's rate: the part of the receivable or payable this allocation closes. Equals amount for a document in the book currency; null when the document has no rate.
The exchange gain or loss this allocation realised, in the book currency: the book value of the money that moved minus book_amount. Positive is a gain on a sales invoice and a loss on a purchase invoice, negative the reverse; 0.00 when the money moved at the document's rate or the document is in the book currency; null when the document has no rate.
The ledger transaction that books the payment: the entry it posted, or the imported transaction it was linked to.
The bank statement line this payment reconciles, when it came from one.
import: the payment came in with an import, or was created linked to an imported transaction (transaction_id on create); live: it was recorded and posted here. New values may be added: treat a value you do not know as valid, not as an error.
Known values (open: expect new ones) live, import
Your own id for this record (from the system you migrate from or sync with), unique per organization and resource.