# Accounts and Balances BC

The Accounts and Balances BC acts as the “central ledger” for the system. It interacts primarily with the Settlements and the Transfers BCs, and is a directed sub-system, which means that it is a dependency of the Settlements and Transfers BCs that use it as a “system of record” for the financial accounting.

Note: The Accounts and Balances BC does not contain any Mojaloop business logic. The only logic included in the BC is to ensure that when and external BC attempts to create new journal entries, that they do not cause an account balance to exceed its limits.

# Terms

The following terms are used in this BC, also known as a domain. (TBC)

Term Description
Account Debit/Credit Ledger Account

# Use Cases

Note: As all of the UC workflows for the Accounts and Balances BC are local to the BC and have no external dependencies, no diagrams are required to detail external interactions.

UC Description
Create Account Create new participant account in the System Ledger.
Specify credit/debit Journal Entry limits.
Ensure Account is unique in the System Ledger.
Close Account Close a participant account in the System Ledger and prevent new journal entries from impacting it.
(Still to be determined: Drain balance to another account atomically?)
Insert Journal Entry Insert a participant journal entry into the System Ledger specifying the debit and credit accounts.
Respond with the updated account balance.
Validate the following during transfer;
• Ensure credit/debit limits are not exceeded.
• Validate debit/credit accounts specified for Journal Entry.
Query Account Query the status of participant account.
Query Journal Entries Query Journal debit/credit Entries for an Account.
Last Updated: 10/20/2021, 12:06:06 PM