Applying overdrafts
Represent balance overdrafts and negative balances in your Ledger.
Overview
To send money, the source
is required to have enough funds to execute the transaction. If Blnk detects insufficent funds, the transaction is rejected. However, there are certain transaction workflows that do not fit this default requirement.
Overdrafts is a Blnk feature that lets you successfully record a transaction regardless of the source
’s balance. When overdrafts is enabled, the transaction is processed and the balance (if insufficent) is allowed to go negative.
Learn more about how to work with negative balances
A very popular use-case for overdrafts is lending. You can also use it for internal balances that do not have a starting balance such as @World
.
What we’ll cover …
Enabling overdrafts
Overdrafts are applied when recording a transacton. To enable overdraft, include the allow_overdraft
parameter and set its value to true
in your request body:
Setting overdraft limits
By default, when the allow_overdraft
parameter is set to true without additional settings, there is no limit to how negative an account balance can go.
However, in most cases, you’ll want to define a maximum overdraft limit using the overdraft_limit
parameter.
Overdraft fields | Type | Description |
---|---|---|
allow_overdraft | Boolean | Enables overdraft functionality, allowing the account balance to go negative. |
overdraft_limit | Number | Sets the maximum overdraft amount. |
How overdraft limits work
When processing a transaction with an overdraft limit:
-
If the source account has sufficient funds, the transaction proceeds as normal.
-
If the source account has insufficient funds but
allow_overdraft
istrue
:- If
overdraft_limit
is set to 0 or not provided, the transaction will succeed, and the balance can go negative without restriction. - If
overdraft_limit
is greater than 0, the transaction will only succeed if the resulting negative balance does not exceed the specified limit.
- If
Error handling
If a transaction would cause the balance to exceed the overdraft limit, it will fail with the following error message:
Some real-life applications
-
Loans and credit facilities: You can easily implement lending features, track how much a customer has spent outside of their available balance, manage credit history, etc., and record it all in your Blnk Ledger.
With overdraft limits, you can set credit limits for different customers based on their creditworthiness.
-
Internal money movement: Your internal balances can often face fluctuations in cash flow, especially during unpredictable periods. Overdrafts allow you to efficiently manage this without disrupting your financial operation.
Setting overdraft limits helps maintain control over internal spending.
-
Prepaid cards with buffer: You can implement prepaid cards that allow a small overdraft buffer (e.g., $20) to handle scenarios like tips added after a restaurant charge.
-
Tiered overdraft limits: You can implement different overdraft limits for different customer tiers or account types by storing these values in your system and applying the appropriate limit in each transaction.
Need help?
We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool.
To ask questions or discuss issues, please contact us or join our Discord community.
Love building with Blnk? We’d love to hear your feedback. Tell us here.