The General Ledger is created by default when you deploy your Blnk server.
- What are internal balances?
- Creating an internal balance
- Naming conventions
- Representing external accounts
1. What are internal balances?
An internal balance is a ledger balance owned by your organization, e.g., revenue, fees, loans, etc. You can use an internal balance to track interactions between your own accounts as an organization and your customers accounts managed by your application. For instance, you own an online e-commerce app that assigns a wallet to every signed up user. Two things happen:- Every time a user pays for something on your app with their wallet, their balance is debited and you earn revenue.
- Every time a user funds their wallet, a fee is debited from the user’s wallet and paid somewhere (the e-commerce startup or the payment processor).
2. Creating an internal balance
Blnk makes this simple by automating the creation and identification of balances in the General Ledger. When a transaction is recorded and a balance is referenced using the ”@” prefix, Blnk checks to see if it exists in the General Ledger. If the specified balance doesn’t exist, it is automatically created, and the transaction is processed accordingly.Internal balances are created this way to ensure that only General Ledger balances that participate in your money movement map are stored and tracked in your ledger.
@Revenue
and fees with @Fees
. A transaction request from the user’s wallet when they pay for something on the app would look like this:
Request
When you post a transaction to a new internal balance, the balance is created with the same asset class specified in the transaction, e.g., in the example above,
@Revenue
is a USD internal balance.3. Naming conventions
When choosing names for your internal balances, it’s important to use consistent and descriptive naming schemes. This ensures easy recall and reduces the risk of errors when posting transactions. Here are some things to note when naming your internal balances:- Always use the @ prefix to automatically add it to the General Ledger.
- Use names that clearly describe the balance’s purpose, e.g.,
@Revenue
,@Fees
,@World
, etc. - Avoid using the same name for internal balances that serve the same function but represent different asset classes. For example, instead of naming two balances @Revenue—one in EUR and the other in USD—name them @RevenueUSD and @RevenueEUR for better clarity and easier reference in your integration.
- Use camel case (
@OnlineRevenue
) or underscores (@online_revenue
) to separate words for better readability. Avoid including spaces to prevent formatting issues. - Keep it short to facilitate easier referencing.