Transaction Creation
Transactions are created in the POST /transaction method, where the user informs the type of transaction and the list of entries and their individual currencies and amounts.
Important: the currency and amount informed in the first entry are those that will be used in transaction queries
It is possible to optionally inform a custom value for later conciliation by the user using the external_id parameter.
It is also possible to optionally inform a date for a transaction referring to a date other than the creation date in the settled_at parameter. If this parameter is not informed, the system will consider the date when the transaction was created.
It is also possible to optionally inform a parent transaction ID referring to another prior transaction. This parameter can be used later for conciliation purposes by the user.
The system finally allows the user to enter a set of data (metadata) to be persisted in the transaction, entries and journal, and returned during queries.
Entries
The list of entries corresponds to the desired entries in the transaction (double entries) and receives the values below for each entry:
entry_type
string
User-defined field for customer use
entry_order
integer
the order of execution of the entry
currency
string
currency to be moved at entry
amount
integer
amount to be moved at entry. The amount, in integer, must respect the decimals of the currency
debit_balance_id
uuid
balance id to be debited
debit_balance_validation
string
type of validation to be performed on the balance to be debited
credit_balance_id
uuid
balance id to be credited
credit_balance_validation
string
type of validation to be performed on the balance to be credited
Balance Validation
Balances are validated at entries (debit or credit) using the reserved words:
positive
The system will not allow balances to go below zero during transactions
negative
The system will not allow balances to go above zero during transactions
no_validation
The system will not validate balances during transactions
Example of transaction creation:
Response Example:
Last updated