Skip to main content
POST
/
v1
/
accounts
Create account
curl --request POST \
  --url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/accounts \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --header 'x-carbon-key: <x-carbon-key>' \
  --data '{
  "account_type": "static",
  "third_party": true,
  "customer_id": "1732ca47-42b2-4990-a65d-c369e934eed3"
}'
{
  "status": "success",
  "message": "account created successfully",
  "data": {
    "id": "5da78692-ffbc-4f1e-b60b-4febd75c4d66",
    "account": {
      "bank_name": "CARBON LIMITED",
      "bank_code": "565",
      "account_name": "MARK ERELU-CARBON",
      "account_number": "6142285181",
      "client_id": "452716534"
    },
    "owner": {
      "first_name": "mark",
      "last_name": "erelu",
      "email": "erelu@yahoo.com",
      "phone": "08088000030"
    },
    "account_type": "static",
    "mode": "sandbox",
    "created_at": "2024-03-07T15:03:03.000Z",
    "updated_at": "2024-03-07T15:03:03.000Z"
  }
}

Overview

This endpoint creates a new virtual account based on the specified account type.
  • For third-party accounts (business use), set third_party to true and provide a customer_id.
  • For sub-accounts (collections), set third_party to false and provide an account_name.
  • If third_party is not specified, it defaults to true.

Endpoint

POST /accounts

Request Body

Standard Account Creation (Business Use)

{
  "account_type": "static",
  "third_party": true,
  "customer_id": "1732ca47-42b2-4990-a65d-c369e934eed3"
}

Sub-Account Creation (Collections)

{
  "account_type": "static",
  "third_party": false,
  "account_name": "Collections"
}

Response

{
    "status": "success",
    "message": "account created successfully",
    "data": {
        "id": "5da78692-ffbc-4f1e-b60b-4febd75c4d66",
        "account": {
            "bank_name": "DEMO BANK",
            "bank_code": "565",
            "account_name": "OJO BENSON - DEMO BANK",
            "account_number": "0000000000",
            "client_id": "0000000"
        },
        "owner": {
            "first_name": "ojo",
            "last_name": "erelu",
            "email": "erelu@yahoo.com",
            "phone": "08088000030"
        },
        "account_type": "static",
        "mode": "sandbox",
        "created_at": "2024-03-07T15:03:03.000Z",
        "updated_at": "2024-03-07T15:03:03.000Z"
    }
}

Authorizations

apikey
string
header
required

Provide your API key in the 'apikey' header.

Headers

x-carbon-key
string
required

Body

application/json

Create a new virtual account based on account type

account_type
enum<string>
required

Must always be 'static'

Available options:
static
third_party
boolean
default:true

Set to true when creating an account for a third-party customer (business use). Set to false when creating a sub-account for your own business (collections). Defaults to true if not provided.

customer_id
string

Required if third_party is true. The customer to associate the account with.

account_name
string

Required if third_party is false. The sub-account name (e.g. 'SUBACCOUNT' -> BUSINESS NAME - SUBACCOUNT).

Response

200 - application/json

OK

The response is of type object.

I