PaymentAllocation
ResponseThe part of a payment that settles one document.
Returned in responses. Its enums are open: tolerate values not listed here, which later versions may add.
Attributes
6Kind 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.