Account-to-Account Transfer (Book Transfer)
Internal transfers allow you to move funds between your own accounts on Anchor.
When you want to send money between accounts in your organisation, you need to make a Book transfer. Common uses for book transfer payments include:
- Moving funds between two accounts that belong to the same user
- Moving funds between two accounts that belong to different users
- Moving funds from your organization’s root account to your user’s accounts.
- Moving funds from
DepositAccount
toSubAccount
and vice versa. - Moving funds from
SubAccount
toSubAccount
- Moving funds from
DepositAccount
toDeposit Account
To make a Book Transfer, you need to make a POST
request to to the Create Transfer API. You’ll need to pass the account ID of the account you want to send the money from.
Book transfer is Option 1 on the documentation
To create a book create a book transfer request, you need to pass the following parameters: type (string), attributes (object) relationships (object). (Refer to the transfer data model page for more information).
Every book transfer has two relationships: source account and the recipient account or destinationAccount.
Sample Request to Initiate a Book (subaccount-to-subaccount) Transfer:
curl --request POST \
--url https://api.sandbox.getanchor.co/api/v1/transfers \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-anchor-key: <API Key>' \
--data '
{
"data": {
"type": "BookTransfer",
"attributes": {
"currency": "NGN",
"amount": 500000,
"reason": "sample transfer",
"reference": "ref_achorr_12321"
},
"relationships": {
"destinationAccount": {
"data": {
"type": "SubAccount",
"id": "16932376220293-anc_subacc"
}
},
"account": {
"data": {
"type": "SubAccount",
"id": "16932386254124-anc_subacc"
}
}
}
}
}'
{
"data": {
"id": "16941741115751-anc_trsf",
"type": "BOOK_TRANSFER",
"attributes": {
"reference": "ref_achorr_12321",
"createdAt": "2023-09-08T11:55:11.597254",
"reason": "sample transfer",
"amount": 500000,
"currency": "NGN",
"status": "COMPLETED"
},
"relationships": {
"destinationSubAccount": {
"data": {
"id": "16932376220293-anc_subacc",
"type": "SubAccount"
}
},
"sourceSubAccount": {
"data": {
"id": "16932386254124-anc_subacc",
"type": "SubAccount"
}
},
"destinationAccount": {
"data": {
"id": "16922123768364-anc_acc",
"type": "DepositAccount"
}
},
"account": {
"data": {
"id": "16922123768364-anc_acc",
"type": "DepositAccount"
}
},
"customer": {
"data": {
"id": "16922123736510-anc_bus_cst",
"type": "BusinessCustomer"
}
}
}
}
}
In the above payload: the relationships object contains two objects: the destinationAccount object and the account object.
The destinationAccount object refers to the recipient account that the money will be sent two. This recipient account can either be a deposit account or a subaccount that exists in your organization.
The account object refers the source where the money will be sent from. This source account can either be a deposit account or a subaccount that exists in your organization.
Updated 4 months ago