Skip to main content

Create an account

You can use the create account endpoint to create an account for a business or individual. The types of accounts you can create include “main”, “sub”, and “virtual” accounts. An important difference is that virtual accounts cannot hold value, and any payment made to a virtual account usually ends up in a main account. This makes virtual accounts ideal when you want to create different payment channels that end up in a single collection account where you can access the funds. These accounts can only receive NIP transfers.

Your request to create an account should look like so:

Sample Request
curl https://api.allawee.com/accounts
-H "Authorization: Bearer YOUR_SECRET_KEY"
-H "Content-Type: application/json"
-d '{
"name": "string",
"settlementAccount": "string",
"reference": "string",
"customer": "string",
"currency": "NGN",
"type": "main",
"depositChannels": [
"bank-account"
],
"metadata": {}
}'
-X POST
Request Body ParameterRequired?Description
nameYesThe account name. When a name enquiry is performed on the account, this is the account name that will show up.
settlementAccountNoThis should be present for virtual accounts, and is the settlement account where the funds are deposited after payments come in.
referenceNoAccount reference
customerNoA customer identifier.
currencyYesThis shows the account currency. It should either be NGN or USD.
typeYesThe account type should be main, sub, or virtual.
depositChannelsNoThe channel for deposits. This currently only supports bank-account deposits.
metadataNoAny metadata you wish to associate with the card.
Sample Success Response
{
"code": "success",
"data": {
"name": "funding account",
"type": "main",
"status": "active",
"currency": "NGN",
"depositChannels": [
{
"accountName": "funding account",
"accountNumber": "0088664826",
"bankName": "Allawee Sandbox Bank",
"bankCode": "000",
"partner": "allawee-sandbox"
}
],
"createdAt": "2023-03-15T00:23:10.926Z",
"updatedAt": "2023-03-15T00:23:10.926Z",
"id": "ac.2tXPYgzWRmKh3H9D4",
"object": "account"
}
}