Domain-Specific Language (DSL)
Midaz utilizes a Domain-Specific Language (DSL) named Gold to model asset balance transfers within the banking sector.
While a regular user may think that a transaction occurs only from one source to one destination, the amount is usually sent to multiple accounts. For example, when you withdraw money using your card, the source account is debited, and the payment card issuer's account, the tax payment account, and the fee-receiving account are partially credited. The DSL used by Midaz provides a flexible and powerful way to model and execute financial transactions. It offers a range of options to specify origins, destinations, and values. Moreover, transaction templates simplify this process by providing standardized models for common transactions. The use of accounting routes ensures the accuracy of records and makes it easier to identify issues in complex transactions.
There are two main ways to perform transactions:
Manual: specifying where each portion of the amount should be sent. Ideal for scenarios without a pattern in the transfers.
Transaction template: using a specific transaction template, abstractions such as the withdrawal fee would be managed in the background, removing this responsibility from the user.
Sending the DSL file
After creating the .gold file as needed using DSL, the user must send the file via API using the multipart/form-data
parameter of POST
requests.
In the next pages, you will find more information about the common DSL components of a transaction.
Last updated