This is a staging build of the docs
We've reorganized our products to make building with Codat easier than ever
Skip to main content

Create source account

To establish a bank feed with your customer's accounting software, you'll first need to set up source accounts. These accounts serve as representations of the company's financial accounts within the Codat platform.

During the subsequent mapping process, these source accounts can be linked to corresponding accounts in the customer's accounting software.

UK specific requirements

For GBP bank accounts, sortCode is also a required field.

Codat categorizes bank accounts into either credit or debit types for standardization.

Below is a list that matches Open Banking's AccountSubType with Codat's standardized accountType:

AccountSubTypeaccountType (Codat)
ChargeCardCredit
CreditCardCredit
CurrentAccountDebit
EMoneyDebit
LoanCredit
MortgageCredit
PrePaidCardDebit
SavingsDebit

Example request body for creating a debit account:

POST /companies/:companyId/connections/:connectionId/connectionInfo/bankFeedAccounts
{
"id": "ac-001",
"accountName": "Checking Account",
"accountType": "Debit",
"accountNumber": "12345670",
"currency": "GBP",
"balance": 4002
}

The account status will stay as pending until the company associates the source account with a corresponding target account in their accounting software.

You must wait for the status to change to linked before you can successfully transmit any bank transactions.

Once the source account is successfully created you can then guide the company through the mapping process.

Adding multi currency accounts 💱

You can create multiple accounts in different currencies using the same POST endpoint for the company and data connection.

If the user has not enabled multi-currency in their accounting software you will get an error message which you can display to the user.

Updating a source account

In certain situations, you might wish to modify a source account prior to its mapping. This could occur if the user at the company has a preference for a specific bank account name to appear in their accounting software.

To achieve this, you can use the update-source-accounts endpoint.

PUT /companies/:companyId/connections/:connectionId/connectionInfo/bankFeedAccounts/:accountId
{
"id": "ac-001",
"accountName": "Bank of X Checking Account",
"accountType": "Debit",
"accountNumber": "12345670",
"currency": "GBP",
"balance": 4002
}

Removing a source account

If your customer decides to close their account, you can also remove it from Codat . Doing so will not delete the account from their accounting software, but it will disable the bank feed, preventing any new transactions from appearing.

DELETE /companies/:companyId/connections/:connectionId/connectionInfo/bankFeedAccounts/:accountId


Was this page useful?
❤️
👍
🤔
👎
😭