Account Numbers
Account number works like a pointer to a single underlying deposit account. While traditional banks typically only let you have one account number to one deposit account, Anchor lets you create as many account numbers as you need — all referring to the same deposit account. Account Numbers allow you to fund your bank account directly meaning you can generate unique Account Numbers for different transactions.
Fetch Account Number of a Deposit Account
You can get the account number tied to a deposit account in two ways.
Option 1:
Make a GET
request to the account number endpoint and provide the settlementAccountId
of the deposit account in your query parameter
Method | Endpoint |
---|---|
GET | {{baseUrl}}/api/v1/account-number |
Sample request payload and 200 OK response are given below:
curl --request GET \
--url 'https://api.getanchor.co/api/v1/account-number' \
--header 'accept: application/json' \
--header 'x-anchor-key: <API Key>'
{
"data": [
{
"id": "169925847416910-anc_acc_num",
"type": "AccountNumber",
"attributes": {
"createdAt": "2023-11-06T08:14:34",
"bank": {
"id": "1656585494013221-anc_bk",
"name": "PROVIDUS BANK",
"nipCode": "000023"
},
"isDefault": true,
"accountName": "Great Busness",
"permanent": true,
"currency": "NGN",
"accountNumber": "2962576964",
"status": "ACTIVE"
},
"relationships": {
"settlementAccount": {
"data": {
"id": "169925847367121-anc_acc",
"type": "DepositAccount"
}
},
"customer": {
"data": {
"id": "16976298908802-anc_bus_cst",
"type": "BusinessCustomer"
}
}
}
}
],
"meta": {
"pagination": {
"number": 0,
"size": 20,
"total": 1,
"totalPages": 1
}
}
}
Option 2
Make use of our include
feature to expand the AccountNumber relationship when you fetch a deposit account.
Make a GET request to Fetch Deposit Account Endpoint and include AccountNumber
/api/v1/accounts/accountID?include=AccountNumber
Method | Endpoint |
---|---|
GET | {{baseUrl}}/api/v1/accounts/accountId?include=AccountNumber |
Sample request payload and 200 OK response are given below:
curl --request GET \
--url 'https://api.getanchor.co/api/v1/accounts/169925847367121-anc_acc?include=AccountNumber' \
--header 'accept: application/json' \
--header 'x-anchor-key: <API Key>'
{
"data": {
"id": "169925847367121-anc_acc",
"type": "DepositAccount",
"attributes": {
"createdAt": "2023-11-06T08:14:34",
"bank": {
"id": "16565854883910-anc_bk",
"name": "CORESTEP MICROFINANCE BANK",
"cbnCode": "",
"nipCode": "090365"
},
"accountName": "Great Busness",
"frozen": false,
"currency": "NGN",
"accountNumber": "******9800",
"type": "CURRENT",
"status": "ACTIVE"
},
"relationships": {
"subAccounts": {
"data": []
},
"virtualNubans": {
"data": [
{
"id": "169925847405340-anc_va",
"type": "VirtualNuban"
}
]
},
"customer": {
"data": {
"id": "16976298908802-anc_bus_cst",
"type": "BusinessCustomer"
}
}
}
},
"included": [
{
"id": "16992584746910-anc_acc_num",
"type": "AccountNumber",
"attributes": {
"createdAt": "2023-11-06T08:14:34",
"bank": {
"id": "1656585494013221-anc_bk",
"name": "PROVIDUS BANK",
"nipCode": "000023"
},
"isDefault": true,
"accountName": "Great Busness",
"permanent": true,
"currency": "NGN",
"accountNumber": "2962576964",
"status": "ACTIVE"
},
"relationships": {
"settlementAccount": {
"data": {
"id": "169925847367121-anc_acc",
"type": "DepositAccount"
}
},
"customer": {
"data": {
"id": "16976298908802-anc_bus_cst",
"type": "BusinessCustomer"
}
}
}
}
]
}
Fund Deposit Account
To fund a deposit account in live or production environment, send money to the 10-digit account number that is linked to the deposit account and the deposit account will be credited. You can do this via USSD, mobile transfer or by walking into any bank and making a bank transfer.
When an account number receive funds via bank transfer, an InboundNIPTransfer
resource is created. The resource contains details of the sender, source bank, amount, etc.
Method | Endpoint |
---|---|
GET | {{basUrl}}/api/v1/inbound-transfers/{inboundTransferId} |
Here is a sample payload:
{
"id": "17377236798920-anc_inb_trsf",
"type": "InboundNIPTransfer",
"attributes": {
"reference": "17129227043986-ref",
"createdAt": "2025-01-24T13:01:20",
"amount": 100000,
"description": "Transfer from James Doe Smith",
"currency": "NGN",
"sessionId": "100000000120000044125970509532",
"sourceAccountNumber": "8166666666",
"sourceAccountName": "James Doe Smith",
"sourceBank": {
"name": "Paycom(opay)"
},
"status": "COMPLETED",
"updatedAt": "2025-01-24T13:03:20"
},
"relationships": {
"account": {
"data": {
"id": "17129218756850-anc_acc",
"type": "DepositAccount"
}
}
}
}
You can use the support included functionality to fetch the deposit account associated with the InboundNIPTransfer in one API request. Here is a sample request and payload:
curl --location 'https://api.getanchor.co/api/v1/inbound-transfers/17377236798920-anc_inb_trsf?include=DepositAccount' \
--header 'x-anchor-key: .' \
{
"id": "17377236798920-anc_inb_trsf",
"type": "InboundNIPTransfer",
"attributes": {
"reference": "17129227043986-ref",
"createdAt": "2025-01-24T13:01:20",
"amount": 100000,
"description": "Transfer from James Doe Smith",
"currency": "NGN",
"sessionId": "100000000120000044125970509532",
"sourceAccountNumber": "8166666666",
"sourceAccountName": "James Doe Smith",
"sourceBank": {
"name": "Paycom(opay)"
},
"status": "COMPLETED",
"updatedAt": "2025-01-24T13:03:20"
},
"relationships": {
"account": {
"data": {
"id": "17129218756850-anc_acc",
"type": "DepositAccount"
}
}
}
},
"included":[
{
"id":"17129218756850-anc_acc",
"type":"DepositAccount",
"attributes":{
"pendingBalance":0,
"accountName":"Praise Aaron Anuoluwapo",
"frozen":false,
"holdBalance":0,
"accountNumber":"******3133",
"type":"SAVINGS",
"availableBalance":1008263,
"createdAt":"2024-04-12T11:37:56",
"bank":{
"id":"16528052138160-anc_bk",
"name":"CORESTEP MICROFINANCE BANK",
"cbnCode":"",
"nipCode":"090365"
},
"ledgerBalance":1008263,
"frozenBy":"CUSTOMER",
"currency":"NGN",
"status":"ACTIVE"
},
"relationships":{
"accountNumbers":{
"data":[
{
"id":"17195906575250-anc_va",
"type":"AccountNumber"
}
]
},
"subAccounts":{
"data":[
]
},
"virtualNubans":{
"data":[
{
"id":"17195906575250-anc_va",
"type":"VirtualNuban"
}
]
},
"customer":{
"data":{
"id":"1706265491682665-anc_ind_cst",
"type":"IndividualCustomer"
}
}
}
}
]
}
Listen to Events
Once bank transfer is made to an account number in your organization on Anchor, we will send you two webhook events: nip.inbound.received
, and nip.inbound.completed
events.
Events | Description |
---|---|
nip.inbound.received | This event is sent when there's a pending bank transfer into a deposit account. This means money is about to be deposited to your account |
nip.inbound.completed | This is received when the funds is settled into the deposit account. You can listen to this event to give value to your customers. |
Sample payloads are given below:
{
"id":"17290000280070-anc_et",
"type":"nip.inbound.received",
"attributes":{
"createdAt":"2024-10-15T13:47:08.012431205"
},
"relationships":{
"transfer":{
"data":{
"id":"17289975071830-anc_inb_trsf",
"type":"InboundNIPTransfer"
}
},
"account":{
"data":{
"id":"16534929182300-anc_acc",
"type":"DepositAccount"
}
}
}
}
{
"id":"1737723740269161-anc_et",
"type":"nip.inbound.completed",
"attributes":{
"createdAt":"2025-01-24T13:02:20.269203664"
},
"relationships":{
"transfer":{
"data":{
"id":"17289975071830-anc_inb_trsf",
"type":"InboundNIPTransfer"
}
},
"account":{
"data":{
"id":"16534929182300-anc_acc",
"type":"DepositAccount"
}
}
}
}
{
"data":{
"id":"17290000280070-anc_et",
"type":"nip.inbound.completed",
"attributes":{
"createdAt":"2024-10-15T13:47:08.012431205"
},
"relationships":{
"transfer":{
"data":{
"id":"17377236798920-anc_inb_trsf",
"type":"InboundNIPTransfer"
}
},
"account":{
"data":{
"id":"17129218756850-anc_acc",
"type":"DepositAccount"
}
}
}
},
"included":[
{
"id":"17377236798920-anc_inb_trsf",
"type":"InboundNIPTransfer",
"attributes":{
"reference":"17129227043986-ref",
"createdAt":"2025-01-24T13:01:20",
"amount":10000,
"description":"Transfer from PASCHAL IKENNA OGU",
"currency":"NGN",
"sessionId":"100004250124130044125970509532",
"sourceAccountNumber":"8163779347",
"sourceAccountName":"John Doe Smith",
"sourceBank":{
"name":"Paycom(opay)"
},
"status":"COMPLETED",
"updatedAt":"2025-01-24T13:03:20"
},
"relationships":{
"account":{
"data":{
"id":"17129218756850-anc_acc",
"type":"DepositAccount"
}
}
}
},
{
"id":"17129218756850-anc_acc",
"type":"DepositAccount",
"attributes":{
"pendingBalance":0,
"accountName":"Praise Aaron Anuoluwapo",
"frozen":false,
"holdBalance":0,
"accountNumber":"******3133",
"type":"SAVINGS",
"availableBalance":1008263,
"createdAt":"2024-04-12T11:37:56",
"bank":{
"id":"16528052138160-anc_bk",
"name":"CORESTEP MICROFINANCE BANK",
"cbnCode":"",
"nipCode":"090365"
},
"ledgerBalance":1008263,
"frozenBy":"CUSTOMER",
"currency":"NGN",
"status":"ACTIVE"
},
"relationships":{
"accountNumbers":{
"data":[
{
"id":"17195906575250-anc_va",
"type":"AccountNumber"
}
]
},
"virtualNubans":{
"data":[
{
"id":"17195906575250-anc_va",
"type":"VirtualNuban"
}
]
},
"customer":{
"data":{
"id":"1706265491682665-anc_ind_cst",
"type":"IndividualCustomer"
}
}
}
}
]
}
Updated 21 days ago