Documentation Index
Fetch the complete documentation index at: https://docs.layerfi.com/llms.txt
Use this file to discover all available pages before exploring further.
Layer leverages 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 utilize 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.
Once your customers have connected their accounts, Layer will automatically start importing their bank account and credit card transactions. Creating Processor Tokens
First, link a customer’s bank account with Plaid as normal, obtaining an access_token.Next, use the access_token and the account_id for an account to create a processor token via Plaid’s /processor/token/create endpoint.curl -X POST https://sandbox.plaid.com/processor/token/create \
-H 'Content-Type: application/json' \
-d '{
"client_id": "PLAID_CLIENT_ID",
"secret": "PLAID_SECRET",
"access_token": "ACCESS_TOKEN",
"account_id": "ACCOUNT_ID",
"processor": "layer"
}'
{
"processor_token": "processor-sandbox-0asd1-a92nc",
"request_id": "xrQNYZ7Zoh6R7gV"
}
Using Processor Tokens
After creating a processor_token for each of the customer’s accounts, update the customer’s business with the processor tokens to begin ingesting data from the associated accounts.curl -X PUT https://sandbox.layerfi.com/v1/businesses/863ed926-e30d-40f4-8e7e-b0d5387ce4fb \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"plaid_processor_tokens": [
{
"processor_token": "processor-sandbox-0asd1-a92nc"
}
]
}'
Note that you must include all processor tokens you would like associated with the business. Existing processor tokens not included in the request will be removed. You can remove all processor tokens from a business by updating it with an empty list.If there is no business associated with the customer yet, you can also include processor tokens when creating a business.Refreshing Processor Tokens
If the access token for a Plaid account changes, all processor tokens associated with that account are invalidated.If this occurs, create a new processor token for the account, then update the business with the updated list of processor tokens. If you need to see the processor tokens already associated with the business, call the List Plaid Accounts endpoint.