# How overdraft works
Overdraft is a financial service that allows you to continue making transactions even if there are insufficient funds in your account. This feature provides a safety net for individuals and businesses, ensuring that essential payments and purchases can still be made despite temporary shortfalls in available funds. By permitting your transactions to proceed when funds are insufficient, overdraft helps mitigate the potential disruptions and financial stress that might otherwise occur. Pismo's overdraft service enables your account to access a predetermined amount (the account overdraft limit) authorized by the financial institution to cover for insufficient funds. Interest is typically calculated on the negative balance, and fees can be applied based on how long the account remains overdrawn. # How to set up overdraft Setting up overdraft involves these steps. 1. [Set overdraft limit](#step-1-set-overdraft-limit) 2. [Create interest plan](#step-2-create-interest-plan) 3. [Create overdraft product](#step-3-create-overdraft-product) 4. [Attach overdraft product to account](#step-4-attach-overdraft-product-to-account) ## Step 1: Set overdraft limit Set your account overdraft limit by executing the [Update account limits](https://developers.pismo.io/pismo-docs/reference/patch-v1-account-limit) endpoint with the `total_overdraft_limit` field set to the value of the limit. This ensures that the account has a predefined limit that can be used for overdraft transactions. ## Step 2: Create interest plan Use the [Create interest plan](https://developers.pismo.io/pismo-docs/reference/post-v1-interest-plan) endpoint to define how interest is calculated on an overdraft amount. ## Step 3: Create overdraft product Use the [Create overdraft product](https://developers.pismo.io/pismo-docs/reference/post-overdraft-product) endpoint to create an overdraft product. If the product is successfully created, the endpoint returns a `201` response, and an event is generated which contains the parameters of the new product. ## Step 4: Attach overdraft product to account Link the created overdraft product to an account using the [Attach product to account](https://developers.pismo.io/pismo-docs/reference/post-attach-product-to-account) endpoint. When the linking is successful, a `2xx` response is returned. If an error occurs, a `4xx` error is returned with the reason for the error. ## Detach overdraft product from account To unlink an overdraft product from an account, use the [Detach product from account](https://developers.pismo.io/pismo-docs/reference/post-detach-product-from-account) endpoint. ## Attach overdraft product to program You can attach your overdraft product to a program using the [Attach product to program](https://developers.pismo.io/pismo-docs/reference/post-attach-product-to-program) endpoint. Make sure to include the relevant program and product IDs in your request. ## Check detach status Pismo detaches the overdraft product from your account upon receiving your request, you can check the detach status by calling [Get limit config by account](https://developers.pismo.io/pismo-docs/reference/get-config-by-account-1), and make sure that the response returns `over_limit = enable: false`.
Sample response ```json { "over_limit": { "enable": false } } ```
# Additional endpoints These endpoints are also available for managing overdraft. | Description | Endpoint | | -------------------------------------------------------------- | --------------------------------------------------- | | [Get account attachment](https://developers.pismo.io/pismo-docs/reference/get-overdraft-account-attachment) | Get the overdraft product linked to the account ID | | [List product](https://developers.pismo.io/pismo-docs/reference/interest-bearing-v1-list-products) | List all overdraft products created by organization | | [Get overdraft product](https://developers.pismo.io/pismo-docs/reference/get-overdraft-product) | Get specific product by product ID |