Subledgers (Sub Accounts)

Overview

Anchor offers the ability to create subledger accounts(Sub Accounts) under your deposit account instantly and on-demand. Our subledger account is a child of your deposit account, each account has it's own unique account number(Virtual Nuban) and must be tied to a customer.

In Anchor, Subledger accounts are a first class citizen. Meaning, subledger account maintains a record of its own balances and transactions and all transactions first go through a subledger account, followed by the deposit account.

Implicit Subledger Account

Your deposit account has what is called an "implicit" subledger account, which is automatically created and maintained. The implicit subledger allows you to track the portion of the balance and transactions that directly belongs to your deposit account.

With the use of an implicit subaccount, your deposit account's subledger accounts will always sum to the balance of your deposit account. It is virtually impossible for your deposit account and subledger to be out of balance.

It’s also important to note that your deposit account's implicit balance can enter negative. This would occur in situations where you move more money from your deposit account that are attributed to your other subledger account. It is your responsibility to maintain and reconcile your subledger system.

For API reference on subledgers click here.

Getting Started

Examples are often the easiest way to explain. Feel free to head over to the API reference if you'd rather dive straight in!

In this guide, we will perform the following steps to build our workflow:

  1. Fetch the FBO Deposit Account ID
  2. Create a customer
  3. Create a SubAccount
  4. Fetch your Sub Account details

Speak to your implementation to configure your program for Subledger. Keep in mind that Subledger Accounts can only be created under the FBO root account.

curl --location --request GET 'https://api.getanchor.co/api/v1/accounts?accountType=FBO' \
--header 'x-anchor-key;'
{
    "data": [
        {
            "id": "16678058640591-anc_acc",
            "type": "DepositAccount",
            "attributes": {
                "createdAt": "2022-11-07T08:24:24",
                "bank": {
                    "id": "16528052138160-anc_bk",
                    "name": "CORESTEP MICROFINANCE BANK",
                    "cbnCode": "",
                    "nipCode": "090365"
                },
                "accountName": "ANCHOR SOFTWARE SYSTEMS LTD",
                "frozen": false,
                "currency": "NGN",
                "accountNumber": "******3679",
                "type": "FBO",
                "status": "ACTIVE"
            },
            "relationships": {
                "subAccounts": {
                    "data": [
                    ]
                },
                "virtualNubans": {
                    "data": [
                        {
                            "id": "16678063407180-anc_va",
                            "type": "VirtualNuban"
                        }
                    ]
                },
                "customer": {
                    "data": {
                        "id": "16534920868750-anc_bus_cst",
                        "type": "BusinessCustomer"
                    }
                }
            }
        }

The only information required is the customerID and the parent accountID (deposit account). Once opened, the subledger is ready to transact usually within a few seconds or less.

curl --location --request POST 'https://api.getanchor.co/api/v1/sub-accounts' \
--header 'x-anchor-key;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "data": {
        "type": "SubAccount",
        "attributes": {
            "createVirtualNuban": false
        },
        "relationships": {
            "customer": {
                "data": {
                    "id": "16628378601701-anc_ind_cst",
                    "type": "IndividualCustomer"
                }
            },
            "parentAccount": {
                "data": {
                    "id": "16678058640591-anc_acc",
                    "type": "DepositAccount"
                }
            }
        }
    }
}'
"data": [
        {
            "id": "16678103678152-anc_subacc",
            "type": "SubAccount",
            "attributes": {
                "createdAt": "2022-11-07T09:39:28",
                "accountType": "REGULAR"
            },
            "relationships": {
                "virtualNubans": {
                    "data": []
                },
                "parentAccount": {
                    "data": {
                        "id": "16678058640591-anc_acc",
                        "type": "DepositAccount"
                    }
                },
                "customer": {
                    "data": {
                        "id": "16628378601701-anc_ind_cst",
                        "type": "IndividualCustomer"
                    }
                }
            }
        }

📘

Limitations

Subledger is currently available only on Live Environment.