This document provides examples and surface-level information on generic settlements in the Clearing API.
To ensure a robust partner integration, it is therefore recommended to read the in-depth documentation about Generic Settlements.
A generic settlement consists of financial transactions used to distribute money between relevant parties/accounts. The clearing process itself is to ensure:
- Data integrity and validation of the settlement and its transactions.
- Creation of accounting entries for general ledger and financial reporting.
- Documentation for auditing purposes.
The Clearing API
All endpoints in the Clearing API requires an authentication header. To start using the API, you will need a client ID with the correct permissions. Read more in the guide about Authentication.
Please refer to the Clearing API documentation for more information about the endpoints used in the examples below.
Examples
Minimal settlement
This is the minimal required structure to perform a successful clearing of an (empty) settlement:
Code
When you submit it to the POST /settlement-import/generic endpoint, you will get a response similar to this:
Code
This means that Clearing service has accepted the settlement for processing, and put it in queue to be cleared asynchronously. Since no annexes are defined, the clearing will not generate any accounting entries and has therefore little purpose for a partner.
It might take some time before the clearing is fully processed. You can check the status by querying GET /settlement-import/{id}
with the returned id:
Code
Settlement with a payment annex
Settlements consist of the hierarchical elements: Transactions, Annexes, and Parameters. This next example defines
a settlement with one transaction of type ADVANCE, which contains one annex of type EOS:Payment:Advance. This represents
an advance payment of 372.00 defined in a priceContribution. The in-depth documentation provides more information on the hierarchical structure.
When this settlement is cleared, the Clearing service will generate accounting entries. The transaction will be visible in the user interface and relevant financial reports:
Code
Important to remember
-
The
settlementNomust be sequentially incremented by 1 per settlement, and the combination ofsettlementNoandposRefmust be unique. Keeping track of settlement numbers is the responsibility of the partner. -
It's worth noting that if previous settlements fail, or if settlements become out of sequence, subsequent settlements will not be processed until all previous settlements are successfully cleared.
-
Once a settlement is cleared, it cannot be modified or deleted. Any corrections must be submitted through new settlements. Refer to the in-depth documentation for settlement corrections.
-
The definition of
settlementDateis partially up to the partner. This could for example be the date the sale was made or the date the settlement is uploaded to Clearing service. However, it's worth noting that setting it to a future date can delay the clearing process if it happens to fall outside the current calendar month. -
The annex can be expanded with additional attributes as needed: MVA code, external settlement number, etc. You can for example add a "context" field to the settlement/annex to specify additional information relevant to the transaction. This will not affect the clearing process, but will appear on financial reports that support the specific key.
-
Comments are supposed to be short and relevant to the settlement/clearing.
-
It can be assumed that any
4xxor5xxHTTP Code responses when posting a generic settlement, result in the settlement not being saved by the Clearing service for processing. Therefore, the same settlement data can be posted again for a retry. This includes retries on the samesettlementNoandposRefcombination.