Settlement note XML reference
A settlement note can carry an XML file next to its PDF. This page describes that file for the two products that have one, Invoice factoring sell and Invoice service, so that you can read it in an integration. For how to find and download the file, see Fetch reports and files through the API. For what the settlement notes are and who receives them, see Reports and files Quiddly sends.
When the file exists
Section titled “When the file exists”- The client’s settlement note formats include XML. In the Operations Portal
this is the picker Choose format for Client Report “Invoice/Factoring
Settlement Note” on the client’s Reports tab. In the API it is the
client document setting
generateXml. - Quiddly generates the XML in the background when it generates the settlement
note. It is a document of the same report as the PDF. Look for the document
with
typeSETTLEMENT_SPECIFICATION_XMLon a factoring settlement note, andSETTLEMENT_INVOICE_SERVICE_XMLon an invoice settlement note. - Business loan and overdrawn settlement notes have no XML.
Elements without a value are left out of the file, so do not expect every element in every row.
The legacy format
Section titled “The legacy format”When the setting USE_LEGACY_XML_SETTLEMENT_NOTES is on, either for the whole
system or for the client, Quiddly generates the legacy format instead, and only
for factoring settlement notes. An invoice service settlement note then gets no
XML. Contact Quiddly support to change the setting.
The legacy file has the root PaymentSpecification with one Entry. It is a
report of its own, of type FACTORING_SETTLEMENT_NOTE_XML. In it, CustNo and
CustName hold the identification number and the name of the service provider
(the instance provider), not of the client or the debtor. This is by design. The
client is identified by the account number in Reference, which holds the id of
the client account.
The rest of this page describes the format that is used when the setting is off.
Factoring settlement note
Section titled “Factoring settlement note”The root is FactoringSettlementNote, with these sections.
DocumentInformation
Section titled “DocumentInformation”| Element | Holds |
|---|---|
ReportNumber | The id of the transaction report |
ClientID, ClientName, VATNumber | The client |
AccountNumber | The id of the client account |
TransactionDate | The transaction date of the report |
Product | Invoice Factoring Sell |
Currency | The currency code of the client account |
Document | The id of the settlement note document |
PayoutIDs | The payout ids of the note, separated by a comma and a space |
Summary
Section titled “Summary”| Element | Holds |
|---|---|
InvoiceTotal, NumberOfInvoices | The financed amount and the number of invoices in the Invoices section |
CreditFee, AdminFee | The financing fees and the administration fees of those invoices |
VATFee | The VAT on the fees |
OtherFee | The amounts of the Other section and the Recourse section |
TotalToPayout | The amount to pay out |
Invoices, Recourse and Other
Section titled “Invoices, Recourse and Other”Invoices has one Invoice element for each financed invoice, with the invoice
number, type, payment reference, customer, due date, finance date, recourse flag,
amounts, fees, exchange rate and TotalToPayout.
Recourse has one RecourseTransaction for each invoice that was repurchased
from Quiddly, with its date, invoice number, reference, customer,
InvoiceTotal and RecoursedTotal.
Other has one Transaction for everything else on the note. Its elements are
Date, Type, the invoice number, type and reference and the customer when the
transaction belongs to an invoice, Description, Quantity, OriginalAmount,
VAT, Total, IsBalancingTransaction and Recourse.
Invoice service settlement note
Section titled “Invoice service settlement note”The root is ServiceSettlementNote. DocumentInformation has the same elements
as above, except that the element holding the document id is DocumentID, and
Product is Invoice Service.
| Section | Holds |
|---|---|
Summary | Payments, VAT (with a label attribute that names the VAT percentages), Fees, Other and TotalToPayout |
Payments | One Payment for each debtor payment that the note settles, with date, invoice, reference, customer and Amount |
Fees | One Fee for each fee article, with Type (the article code), Description, Quantity, ExclVAT, VAT and Total |
Other | One Transaction for everything else, with the same elements as in the factoring note, except that it has Amount and no Quantity, OriginalAmount or VAT |
What the Type in the Other section holds
Section titled “What the Type in the Other section holds”Type is one of three things, and the note does not mark which:
- A client account transaction type, for a transaction on the client account
such as a payout, a transfer between accounts, a write-off, a direct payment or
an unplaced payment. The value is the name of the transaction type, for example
CLIENT_PAYOUT,MANUAL_TRANSFER,BALANCING_TRANSFER,INVOICE_SOLD_DIRECT_PAYMENT,INVOICE_SOLD_CAPITAL_WRITEOFForUNPLACED_ACCOUNT_PAYMENT. - A fee article code, for a fee that the note bills to the client and that is
not part of an invoice row in the Invoices section. A custom fee has a code
that starts with
CUSTOM_FEE. This applies to the factoring note. In the service note the fees are inFees, with the article code asTypethere. - A debtor payment type, in the factoring note only, for the parts of a
payment batch (for example
INVOICE_PAYMENT, or a payment tolerance or cash discount). The service note lists debtor payments inPaymentsinstead.
In the factoring note, a transaction with a total of zero is left out. The XML always shows a balancing
transaction as one row with IsBalancingTransaction set to true, and not
broken down into the transactions behind it as the PDF can be. The same event can
also appear in other documents, for example the activity report.