Create Deposit Account

Creating Deposit Accounts: Process Flow

To create a deposit account on Anchor using the API, follow this process flow:

  1. Onboard Customer: Begin by onboarding your customer by creating a customer resource using the appropriate customer API endpoint. This step involves collecting and submitting the necessary customer information.
  2. Initiate KYC/KYB: After onboarding the customer, trigger the KYC (Know Your Customer) or KYB (Know Your Business) processes for the onboarded customer. This step ensures compliance with relevant regulations and verifies the customer's identity and business information. Note that completing KYC is a requirement to create a deposit account.
  3. Create Deposit Account: Once the KYC/KYB processes are completed successfully, you can proceed to create a deposit account for the customer using the designated API endpoint. This step associates a deposit account with the verified customer. The deposit account name will correspond to the name of the customer whose id was provided in the request body.

Savings Account for Individual Customer

You can create a deposit account for the customer with the customerId, as long as KYC has been completed for the customer.

You can call the list customer endpoint to fetch all the customers within your organization. https://docs.getanchor.co/reference/list-all-customer

To create a deposit account, call the endpoint: /api/v1/accounts

VerbURL
POST{{baseUrl}}/api/v1/accounts

📘

You need the Id and type of a customer. type here will be IndividualCustomer for an individual customers.

Pass the account product to be created. Use SAVINGS when creating a deposit accounts for Individual customers and CURRENT when creating deposit account for business customers.

When creating a deposit account for a individual customer, pass the "productName": "SAVINGS"

📘

Only savings account product can be created for a individual customer.

Sample request payload and 200 OK response are given below:

curl --request POST \
     --url https://api.sandbox.getanchor.co/api/v1/accounts \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-anchor-key: <API Key>' \
     --data '
{
  "data": {
    "type": "DepositAccount",
    "attributes": {
      "productName": "SAVINGS"
    },
    "relationships": {
      "customer": {
        "data": {
          "id": "16968486366112-anc_ind_cst",
          "type": "IndividualCustomer"
        }
      }
    }
  }
}
'
{
  "data": {
    "id": "16968487149490-anc_acc",
    "type": "DepositAccount",
    "attributes": {
      "createdAt": "2023-10-09T10:51:54.971443",
      "bank": {
        "id": "16565854883910-anc_bk",
        "name": "CORESTEP MICROFINANCE BANK",
        "cbnCode": "",
        "nipCode": "090365"
      },
      "accountName": "OLORUNOJE John IBRAHIM",
      "frozen": false,
      "currency": "NGN",
      "accountNumber": "******3736",
      "type": "SAVINGS",
      "status": "ACTIVE"
    },
    "relationships": {
      "customer": {
        "data": {
          "id": "16968486366112-anc_ind_cst",
          "type": "IndividualCustomer"
        }
      }
    }
  }
}

📘

The account accountNumber in the Deposit Account response is masked because you do not need this account number details to fund the account. To fund a deposit account created on Anchor, send money to the Virtual Account Number (virtual NUBAN) that is linked to the deposit account, and the deposit account will be credited.

Current Account for Business Customer

Only CURRENT account product can be created for a business customer. When creating a deposit account for a business customer, pass the "productName": "CURRENT"

📘

Only CURRENT account product can be created for a business customers.

Sample request payload and 200 OK response are given below:

curl --request POST \
     --url https://api.sandbox.getanchor.co/api/v1/accounts \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-anchor-key: <API Key>' \
     --data '
{
  "data": {
    "type": "DepositAccount",
    "attributes": {
      "productName": "CURRENT"
    },
    "relationships": {
      "customer": {
        "data": {
          "id": "16976298908802-anc_bus_cst",
          "type": "BusinessCustomer"
        }
      }
    }
  }
}
'
{
    "data": {
        "id": "170125569082617-anc_acc",
        "type": "DepositAccount",
        "attributes": {
            "createdAt": "2023-11-29T11:01:30.828368",
            "bank": {
                "id": "16565854883910-anc_bk",
                "name": "CORESTEP MICROFINANCE BANK",
                "cbnCode": "",
                "nipCode": "090365"
            },
            "accountName": "Great Busness",
            "frozen": false,
            "currency": "NGN",
            "accountNumber": "******7470",
            "type": "CURRENT",
            "status": "ACTIVE"
        },
        "relationships": {
            "customer": {
                "data": {
                    "id": "16976298908802-anc_bus_cst",
                    "type": "BusinessCustomer"
                }
            }
        }
    }
}

When creating a deposit account on Anchor using the API, keep the following points in mind:

  1. Virtual Account Number (Virtual NUBAN): After a deposit account is created, a virtual account number (virtual NUBAN) will be automatically generated and associated with the deposit account. This virtual NUBAN is used to receive funds into the deposit account. You will be notified via webhook virtualNuban.opened when this virtual nuban is generated.
  2. Funding the Deposit Account: To fund a deposit account, you should send funds to the virtual NUBAN associated with the deposit account, instead of using the masked account number directly linked to the deposit account.
  3. Fetching Virtual NUBAN: To obtain the virtual NUBAN for a specific deposit account, refer to the Fetch Account Number of a Deposit Account guide. This endpoint allows you to retrieve the virtual NUBAN associated with a given deposit account number.

ParameterTypeDescription
typestringThe type for the deposit account. DepositAccount
productNamestringThis takes the product to be created for the account. SAVINGS for individual customers and CURRENT for business customers.
metadataobjectWe support including metadata on most of our resources as a way to add internal information to our system. Metadata takes the form of key-value pairs.
customerobjectThis is the customer object you are creating the account for. It take the id and type of the customer.