Skip to main content
Bank transactions, activity within your customers’ business bank accounts and credit cards, can be ingested by Layer in two ways:
  • From external financial institutions, using Layer’s Plaid integration.
  • From your platform’s embedded bank accounts and credit cards, by importing them directly (including Layer’s integrations with Unit and Stripe Treasury).
For a complete accounting picture, you will also need to import your customers’ sales / AR data.

Import with Plaid

Layer uses Plaid to connect with your customers’ accounts at external financial institutions to ingest data such as transactions and balances and incorporate them into their accounting.

Using Layer’s Plaid connection

If your platform does not already have a Plaid integration, you can use Layer’s Plaid connection to import your customers’ external bank accounts and credit card data. Layer will manage all aspects of the Plaid integration on your behalf.

Using your own Plaid connection

If your platform already has an integration with Plaid, you can grant Layer access to your existing Plaid data through Plaid’s processor token functionality.
To start importing customers’ bank accounts and credit cards into Layer, embed Layer’s Bank Linking react component within your product. This component manages all aspects of Layer’s Plaid connection and walks customers through the process of granting read-only access to their bank account and credit card activity. More detail on using Layer’s embedded UI components is available here.Bank Linking ComponentOnce your customers have connected their accounts, Layer will automatically start importing their bank account and credit card transactions.

Import embedded accounts directly

If your platform provides an embedded bank account or credit card to your customers, Layer can ingest data from these accounts. There are two ways to pass embedded banking activity to Layer:
  • API - Pass bank and credit card transactions to Layer’s API directly.
  • Layer integrations - Layer has direct connections with top embedded banking platforms. You can grant Layer access to pull your customers’ data from these platforms on your behalf. Layer currently supports: Unit and Stripe Treasury.

Importing transactions via API

To import bank transactions to Layer, first call the Create Custom Account endpoint. This endpoint creates the record for this embedded account in Layer’s systems.
Request
curl --request POST \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "external_id": "ww9wwLgkrbU3jkg3J4J7ckBR3zKQV6sLPQevK",
  "mask": "4321",
  "account_name": "My custom account",
  "institution_name": "My custom account institution",
  "account_type": "DEPOSITORY",
  "account_subtype": "checking"
}'
The API will respond with the created Custom Account. Next, pass the transactions that have occured in your embedded account to Layer by calling the Import Transactions endpoint. When making this call, be sure to populate the customAccountId parameter in the URL with the id of the Custom Account you just created.
Request
curl --request POST \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/{customAccountId}/transactions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "transactions": [
    {
      "external_id": "custom-transaction-id-1234",
      "amount": 123,
      "direction": "CREDIT",
      "date": "2023-11-07T05:31:56Z",
      "merchant_name": "My example merchant",
      "merchant_category_code": "4072",
      "description": "Original description",
      "display_description": "Current description to display with details",
      "currency_code": "USD",
      "balance": 123
    }
  ]
}'
The API will respond with a 200 if transactions were successfully imported. Your embedded bank account and its associated transactions will now be accessible across Layer’s accounting workflows, such as transaction categorization and reporting.

Using Layer’s integrations

To use Layer’s embedded banking integrations with Unit and Stripe Treasury, reach out to your Layer contact.