Bank Transactions
Overview
Every Transaction in Asset comes from an External Account, such as a bank account or a credit card. There are two kinds:
- Plaid-connected accounts: your customer connects their bank once, and Asset keeps the account up to date automatically.
- Manual accounts: no connection to the bank. You, or your customer, send the data to Asset.
Both kinds work the same way once a Transaction is in Asset: it becomes a Journal Entry, is categorized, and is reconciled.
| Plaid-connected | Manual | |
|---|---|---|
| Who provides the data | Plaid, from the bank | You, through the API, or your customer, with statements |
| How fresh it is | Updated automatically | As fresh as what you send |
| History on connect | Up to 24 months, depending on the bank | Whatever you send |
| Best for | Banks and cards Plaid supports | Banks Plaid doesn't support, customers who won't connect, or data you already hold |
| Ongoing work | Reconnect when the bank asks the customer to sign in again | Send transactions, or upload a statement every month |
Plaid-connected accounts
Asset uses Plaid to read transactions from your customers' banks. Your customer connects their accounts with the Plaid Link component, and Asset creates an External Account for each one. See Bank integrations for the connection options.
What Asset imports
- History: when an account is first connected, Asset requests up to 24 months of Transactions. How far back it goes depends on the bank. Transactions before the Business's start date are kept but not posted to the books.
- New transactions: Asset imports them when Plaid reports an update, and also runs a daily sync for every connected account.
- Pending transactions: a pending transaction is ignored until the bank posts it, so it only shows up in Asset once it has posted.
- Changes at the bank: if the bank changes a posted transaction's amount or date, or removes it, Asset updates the Transaction and rebuilds its Journal Entry, or deletes it.
- Balance: after each sync, Asset compares the balance the bank reports with the account's balance in the books. This applies to business accounts.
Notifications
If you have a webhook, Asset tells you what is happening with each connection:
| Event | When it fires |
|---|---|
PLAID_ACCOUNT_CONNECTED | After the first sync of a new account, and when a broken connection is repaired |
PLAID_SYNC_STARTED | When a sync begins |
PLAID_TRANSACTIONS_SYNCED | When a sync finishes |
PLAID_ACCOUNT_EXPIRED | When the bank needs your customer to sign in again |
PLAID_ACCOUNT_DISCONNECTED | When an account is removed from a connection |
When a connection needs attention
Banks sometimes ask a customer to sign in again, for example after they change their password. When that happens, syncing stops, Asset sends PLAID_ACCOUNT_EXPIRED, and a reconnect task is created for the Business. Your customer fixes it by going through Plaid Link again. Asset then resumes syncing, sends PLAID_ACCOUNT_CONNECTED, and completes the task.
Pausing and disconnecting
Change an account's status with Update External Account:
| Status | Effect |
|---|---|
connected | The account syncs normally. |
untracked | The account is paused and stops syncing. Set it back to connected to resume. |
disconnected | The account is marked as disconnected and stops syncing. |
Changing the status never removes data. Transactions and Journal Entries already in Asset stay as they are. To remove an account along with its Transactions, Journal Entries and documents, use Delete External Account. This can't be undone.
Manual accounts
Use a manual account when Plaid can't or shouldn't be used: a bank Plaid doesn't support, a customer who doesn't want to connect their bank, or data you already collect yourself.
Create the account
Call Create an External Account with a source of manual or statements:
curl --request POST \
--url https://api.sandbox.getasset.com/v0/business/biz_123456/external-account \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Chase Checking",
"mask": "1234",
"source": "manual",
"type": "business",
"financial_account_type": "bank_account"
}'| Attribute | Request Parameter | Description |
|---|---|---|
| Name | name | The name shown for the account. |
| Mask | mask | The last four digits of the account number. Asset uses it to match an uploaded statement to the account, so keep it accurate. |
| Source | source | manual or statements. See below. |
| Type | type | business or personal. |
| Account Type | financial_account_type | The kind of account, such as bank_account or credit_card. |
| Currency | currency | The account's currency. Defaults to USD. |
A business account also needs financial_account_type or an existing ledger_id. If you only give the type, Asset creates a Ledger for the account. A personal account needs financial_account_type and two Ledgers, contribution_ledger_id and distribution_ledger_id. See Personal Accounts.
The two sources differ in who is expected to provide the data:
manual: you send the Transactions with the API. Asset doesn't request statements.statements: your customer uploads a statement for each month. Asset creates a request for each month's statement.
Send transactions with the API
Use Create Transactions to add up to 100 Transactions per request. See API Import for the details. A few rules to know:
- Each Transaction needs a
transaction_id. Sending the same one again is rejected as a duplicate. - A Transaction dated before the Business's start date is rejected.
- A request can partly succeed. The response lists each Transaction that failed and why.
- If you include
line_itemson a Transaction, Asset uses them as the categorization and skips its own categorization steps.
Upload a statement
Your customer can also add Transactions by uploading a bank statement with Upload Documents for a Business, with the document type statement. This works for any manual account that is connected.
- Asset matches the statement to an account using the account number on the statement and the account's
mask. - Asset reads the statement: the opening balance, the closing balance, and every transaction.
- Asset adds the new Transactions. Asset adds any missing trnsactions extracted from the statement.A transaction that is already in the account, with the same date, amount and description, is linked to the statement and not added again.
Asset sends a STATEMENT_IMPORTED webhook when a statement has been imported. Upload PDFs or images, up to 12 files per request. The same file can't be uploaded twice.
Tell Asset the balance
To let Asset check the books against the bank, update the account with the balance the bank shows:
curl --request PATCH \
--url https://api.sandbox.getasset.com/v0/business/biz_123456/external-account/eac_123456 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "external_balance": 5230.75 }'Asset records the balance with today's date and compares it with the account's balance in the books. A statement's closing balance is also recorded. See Reconciliation for what happens next.
Keeping a manual account current
Asset can't see a manual account, so it only knows what you send. For each one:
- Send new Transactions, or have your customer upload each month's statement.
- Keep the
maskcorrect, so statements match the account. - Update the
external_balancewhen you have a new balance, so Asset can reconcile.
After a transaction arrives
Whether it came from Plaid, the API or a statement, a Transaction goes through the same steps:
- Asset creates a Journal Entry from it.
- Asset categorizes it, or leaves it uncategorized for your customer or a bookkeeper to review.
- The account is reconciled against the balance from the bank, or from a statement.
You can change a Transaction later with Update Transactions, and Asset rebuilds its Journal Entry. A Transaction that Plaid later changes or removes at the bank is updated the same way.
Questions? Reach out via our Contact form.