Plaid Integration

Connect bank accounts through Plaid for automatic transaction syncing.

Connect a Bank Account

  1. Request a Plaid Link token:
bash
curl -X POST "https://api.ondayzero.com/api/v1/plaid/link-token" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"
  1. Use the returned link_token to open Plaid Link in your frontend
  2. After the user connects, exchange the public token:
bash
curl -X POST "https://api.ondayzero.com/api/v1/plaid/exchange" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID" \
  -H "Content-Type: application/json" \
  -d '{ "public_token": "public-sandbox-..." }'

Transaction Syncing

Once connected, transactions sync automatically. New transactions are:

  1. Imported with raw bank descriptions
  2. Cleaned (merchant name normalization)
  3. Auto-categorized using AI and user-defined rules
  4. Available for review in the transactions list

Reauthorization

Bank connections occasionally require reauthorization (e.g., when a bank requires re-login). DayZero tracks these events and prompts users to reauthorize through a new Plaid Link session.

List Connected Accounts

bash
curl "https://api.ondayzero.com/api/v1/plaid/accounts" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"