Bank Sync
Connect your bank accounts and import transactions automatically
Set Up Plaid Bank Connection
Connect your bank accounts to automatically import transactions into your properties.
Setup Steps
- 1
Create a free Plaid account at dashboard.plaid.com
dashboard.plaid.com - 2
Get your Client ID and Secret from the Plaid dashboard
- 3
Add environment variables to your Cloudflare Pages settings:
PLAID_CLIENT_ID=your_client_id PLAID_SECRET=your_sandbox_secret PLAID_ENV=sandbox
- 4
Create the plaid_transactions table in Supabase (SQL below)
- 5
Create the /api/plaid/link and /api/plaid/sync API routes
Required Supabase SQL
CREATE TABLE IF NOT EXISTS plaid_transactions ( id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), plaid_transaction_id TEXT UNIQUE, account_id TEXT, account_name TEXT, amount NUMERIC(10,2), date DATE, name TEXT, merchant_name TEXT, category TEXT[], pending BOOLEAN DEFAULT false, imported BOOLEAN DEFAULT false, property_id UUID REFERENCES properties(id), matched_category TEXT, created_at TIMESTAMPTZ DEFAULT NOW() ); GRANT ALL ON plaid_transactions TO anon; GRANT ALL ON plaid_transactions TO authenticated;
Plaid Sandbox vs Production
Start with sandbox (free, test data). Upgrade to production when ready — requires Plaid approval and connects to real banks.
Once configured, this page will:
- Show a "Connect Bank" button using Plaid Link
- Sync transactions from all connected accounts
- Let you assign each transaction to a property and category
- One-click import to your Financial ledger
- Auto-match common merchants to expense categories
