Accounts & Subaccounts
Learn how to create and management sub-accounts
Once you sign up on VeendHQ Business, you automatically have an account created for you.
What is a Sub-account
Each user on VeendHQ can have multiple Sub-accounts for different use cases.
Create a Sub-account
Create a new sub-account.
POST
{{BASE_URL}}/v1/accounts/{{ACCOUNT_ID}}/subaccount?accountId={{ID}}
Query Parameters
Name | Type | Description |
---|---|---|
accountId* | String |
Request Body
Name | Type | Description |
---|---|---|
name* | John Doe | A name for the sub account |
user* | 62bff....e6f | userId returned from the sign up or login. |
webhookurl | String | A webhook url endpoint to be triggered when certain event occur |
currency* | NGN | The currency to be used for the sub account. This should be same as the main account. |
Get Sub-account Details
Returns details about a sub-account
GET
{{BASE_URL}}/v1/accounts/{{ACCOUNT_ID}}?accountId={{ACCOUNT_ID}}&populate=users
Query Parameters
Name | Type | Description |
---|---|---|
accountId* | 626...44b | |
populate | users |
Get Account Statements
Get the statement of a sub-account which returns information about all transactions on that sub-account.
Returns sub-account statement
GET
{{BASE_URL}}/payments?accountId={{ACCOUNT_ID}}&populate=Purchases&desc=true&limit=5&sort=-_id
Query Parameters
Name | Type | Description |
---|---|---|
populate | Purchases | |
limit | 10 | limit the returned response to a collection of 10 transactions |
sort | String | a field to sort the response by |
Update sub account detail
Update details of a sub-account
PATCH
{{BASE_URL}}/v1/accounts/{{ACCOUNT_ID}}?accountId={{ACCOUNT_ID}}
Request Body
Name | Type | Description |
---|---|---|
name* | Peter Pan |
Transfer funds between Sub-accounts
You can send fund from one sub-account to another on VeendHQ Business Account.
Transfer fund to a subaccount
POST
{{BASE_URL}}/v1/accounts/{{SENDER_ACCOUNT_ID}}/transfer/{{RECEIVER_ACCOUNT_ID}}?accountId={{ID}}
Request Body
Name | Type | Description |
---|---|---|
amount* | 400000 | |
description* | Fund for Airtime |
Lock and Unlock Sub-account Balance
A sub-account balance can be locked or unlocked. Locking a sub-account will prevent disbursement of funds from that sub-account.
BALANCE_ID
The BALANCE_ID can be gotten from the response to a GET call for a sub-account detail.
Lock and Unlock SubAccount Balance
PATCH
https://test.veendhq.com/v1/balances/{{BALANCE_ID}}?accountId={{ACCOUNT_ID}}
Set blocked on the body of the request to true to lock the subaccount balance, otherwise set to false to unblock the account balance.
Query Parameters
Name | Type | Description |
---|---|---|
accountId* | 5d6c3...53d30d |
Request Body
Name | Type | Description |
---|---|---|
blocked* | true | Boolean value to set lock and unlock a sub-account balance |
Get Balance
Get balance for an account or a sub-account.
Return Balance for Account or Sub-Account
GET
https://test.veendhq.com/v1/balances/?account={{ACCOUNT_ID}}&accountId={{ACCOUNT_ID}}
Last updated