---
agentTools:
  projectIndex: https://safehavenmfb.readme.io/llms.txt
---

# Create Sub Account (Individual)

Creates a sub-account: a reserved (static) account number that does not expire. For accounts that expire, use [Create Virtual Account](/reference/create-virtual-account).

Verify the customer first with [Initiate Verification](https://safehavenmfb.readme.io/reference/verify-identity) (and [Validate Verification](https://safehavenmfb.readme.io/reference/validate-verification) for BVN and NIN). Then send the verification's `_id` as `identityId`, plus `identityType` and `identityNumber`.

* `identityId` is required for BVN, NIN and vID.
* `debitAccountNumber` is required when `identityType` is BVNUSSD or vNIN.
* If `callbackUrl` is not set, payment notifications go to the webhook URL on your dashboard.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Safe Haven IBS API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.sandbox.safehavenmfb.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://example.com/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/accounts/v2/subaccount": {
      "post": {
        "summary": "Create Sub Account (Individual)",
        "description": "Creates a sub-account: a reserved (static) account number that does not expire. For accounts that expire, use [Create Virtual Account](/reference/create-virtual-account).",
        "operationId": "create-sub-account-new",
        "parameters": [
          {
            "name": "ClientID",
            "in": "header",
            "description": "Your ibs_client_id, returned by Exchange Client Credentials.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "phoneNumber",
                  "emailAddress",
                  "externalReference",
                  "identityType"
                ],
                "properties": {
                  "phoneNumber": {
                    "type": "string",
                    "description": "This is the phone number of the account holder. It should begin with the country code.",
                    "default": "+2348000000000"
                  },
                  "emailAddress": {
                    "type": "string",
                    "description": "This is the email address.",
                    "default": "user@example.com"
                  },
                  "externalReference": {
                    "type": "string",
                    "description": "This is an external reference to be attached to the account object."
                  },
                  "identityType": {
                    "type": "string",
                    "description": "Identification method the account holder, should be either NIN, vNIN, BVN, BVNUSSD, or vID (if you are using Safe Haven Verification Service). Example: `BVN`.",
                    "enum": [
                      "NIN",
                      "vNIN",
                      "BVN",
                      "BVNUSSD",
                      "vID"
                    ]
                  },
                  "identityNumber": {
                    "type": "string",
                    "description": "It is required when using `BVN`, `NIN`, and `BVNUSSD`. Not required if you are using `vID`"
                  },
                  "identityId": {
                    "type": "string",
                    "description": "The `_id` from the Safe Haven Verification Endpoint. It is required when `vID`, `BVN`, or `NIN`"
                  },
                  "otp": {
                    "type": "string",
                    "description": "The OTP sent to the customer's phone number when you initiate verification using Safe Haven verification endpoint. This works for `BVN` and `NIN` or the OTP sent to customer's phone number when using `BVNUSSD`"
                  },
                  "callbackUrl": {
                    "type": "string",
                    "description": "If not provided, the webhook URL on your Dashboard will be used."
                  },
                  "metadata": {
                    "type": "object",
                    "description": "A JSON object of key-value pairs to attach to the account.",
                    "properties": {}
                  },
                  "companyName": {
                    "type": "string",
                    "description": "The company name."
                  },
                  "debitAccountNumber": {
                    "type": "string",
                    "description": "Required when identityType is BVNUSSD or vNIN."
                  },
                  "autoSweep": {
                    "type": "boolean",
                    "description": "This should be set when creating a virtual account. It determines if auto sweep should be enabled or disabled.",
                    "default": false
                  },
                  "autoSweepDetails": {
                    "type": "object",
                    "description": "This contains the auto sweep details to be filled if creating a virtual account.",
                    "required": [
                      "schedule",
                      "accountNumber"
                    ],
                    "properties": {
                      "schedule": {
                        "type": "string",
                        "description": "This is the schedule for the autosweep",
                        "enum": [
                          "Instant"
                        ]
                      },
                      "accountNumber": {
                        "type": "string",
                        "description": "This represents the account to auto sweep to."
                      }
                    }
                  }
                }
              },
              "examples": {
                "Individual (BVN)": {
                  "value": {
                    "phoneNumber": "+2348000000000",
                    "emailAddress": "user@example.com",
                    "externalReference": "cust-0001",
                    "identityType": "BVN",
                    "identityNumber": "22200000000",
                    "identityId": "65f0c1a2b3c4d5e6f7a8b9c1",
                    "callbackUrl": "https://example.com/webhook",
                    "autoSweep": false
                  }
                },
                "Individual with auto-sweep": {
                  "value": {
                    "phoneNumber": "+2348000000000",
                    "emailAddress": "user@example.com",
                    "externalReference": "cust-0002",
                    "identityType": "NIN",
                    "identityNumber": "12345678901",
                    "identityId": "65f0c1a2b3c4d5e6f7a8b9c1",
                    "autoSweep": true,
                    "autoSweepDetails": {
                      "schedule": "Instant",
                      "accountNumber": "0100000001"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"statusCode\": 200,\n    \"message\": \"Account Created Successfully.\",\n    \"data\": {\n        \"_id\": \"662cf4fe8c6b9a0024372760\",\n        \"client\": \"66x5a83ac6f0ec001ee90fac\",\n        \"accountProduct\": \"612cbd5a5e7f33693c591a8f\",\n        \"accountNumber\": \"0000000000\",\n        \"accountName\": \"ACME LTD / JOHN DOE\",\n        \"accountType\": \"Current\",\n        \"currencyCode\": \"NGN\",\n        \"bvn\": \"22200000000\",\n        \"identityId\": \"662bc0693cd288bcd54e3290\",\n        \"accountBalance\": 0,\n        \"bookBalance\": 0,\n        \"callbackUrl\": \"https://example.com/webhook\",\n        \"isSubAccount\": true,\n        \"subAccountDetails\": {\n            \"_id\": \"662cf4fe8c6b9a0024372762\",\n            \"firstName\": \"John\",\n            \"lastName\": \"Doe\",\n            \"emailAddress\": \"user@example.com\",\n            \"bvn\": \"\"\n        },\n        \"externalReference\": \"193jdeue833jdjsud12ee32\",\n        \"createdAt\": \"2024-04-27T12:52:14.854Z\",\n        \"updatedAt\": \"2024-04-27T12:52:14.854Z\",\n        \"nin\": \"\",\n        \"cbaAccountId\": \"17989\"\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "example": 200,
                      "default": 0
                    },
                    "message": {
                      "type": "string",
                      "example": "Account Created Successfully."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "_id": {
                          "type": "string",
                          "example": "662cf4fe8c6b9a0024372760"
                        },
                        "client": {
                          "type": "string",
                          "example": "66x5a83ac6f0ec001ee90fac"
                        },
                        "accountProduct": {
                          "type": "string",
                          "example": "612cbd5a5e7f33693c591a8f"
                        },
                        "accountNumber": {
                          "type": "string",
                          "example": "0000000000"
                        },
                        "accountName": {
                          "type": "string",
                          "example": "ACME LTD / JOHN DOE"
                        },
                        "accountType": {
                          "type": "string",
                          "example": "Current"
                        },
                        "currencyCode": {
                          "type": "string",
                          "example": "NGN"
                        },
                        "bvn": {
                          "type": "string",
                          "example": "22200000000"
                        },
                        "identityId": {
                          "type": "string",
                          "example": "662bc0693cd288bcd54e3290"
                        },
                        "accountBalance": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "bookBalance": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "callbackUrl": {
                          "type": "string",
                          "example": "https://example.com/webhook"
                        },
                        "isSubAccount": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        },
                        "subAccountDetails": {
                          "type": "object",
                          "properties": {
                            "_id": {
                              "type": "string",
                              "example": "662cf4fe8c6b9a0024372762"
                            },
                            "firstName": {
                              "type": "string",
                              "example": "John"
                            },
                            "lastName": {
                              "type": "string",
                              "example": "Doe"
                            },
                            "emailAddress": {
                              "type": "string",
                              "example": "user@example.com"
                            },
                            "bvn": {
                              "type": "string",
                              "example": ""
                            }
                          }
                        },
                        "externalReference": {
                          "type": "string",
                          "example": "193jdeue833jdjsud12ee32"
                        },
                        "createdAt": {
                          "type": "string",
                          "example": "2024-04-27T12:52:14.854Z"
                        },
                        "updatedAt": {
                          "type": "string",
                          "example": "2024-04-27T12:52:14.854Z"
                        },
                        "nin": {
                          "type": "string",
                          "example": ""
                        },
                        "cbaAccountId": {
                          "type": "string",
                          "example": "17989"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"statusCode\": 400,\n    \"message\": \"Unable to create sub account.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "example": 400,
                      "default": 0
                    },
                    "message": {
                      "type": "string",
                      "example": "Unable to create sub account."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "61e69ed05b7bd4006a962eed:662cf36ee13e98004100e819"
}
```