Provider Sync

Provider Sync Overview

Auto-sync usage-based bills from cloud and API providers.

Provider sync pulls real billing data from external services and writes monthly actuals on variable expenses.

How it works

  1. Mark an expense as variable (is_variable = true)
  2. Connect a provider from the Actuals modal (owners/admins only)
  3. Credentials are encrypted (AES-256-GCM) and stored in provider_links
  4. Sync calculates: billed = base_fee + max(0, usage - allowance)
  5. Only complete billing cycles are persisted (partial current month skipped unless manual sync)

Supported providers

ProviderCurrencyGuide
VercelUSDVercel
OpenAIUSDOpenAI
AnthropicUSDAnthropic
ApifyUSDApify
GoDaddyGoDaddy (domain import, not sync)

GoDaddy is a separate flow — it imports domains as yearly expenses, not monthly actuals.

Automatic sync schedule

Cron job /api/cron/provider-sync runs on the 2nd of each month at 06:00 UTC, syncing the previous calendar month for all connected links.

Manual sync

Click Sync now in the Actuals modal to pull the latest complete period immediately.

Requirements

  • Expense currency must match provider billing currency (USD for all sync providers)
  • bills:variable plan feature (Pro+) when billing is enforced
  • Owner or admin role to connect/disconnect

Disconnect

Use Disconnect in the Actuals modal. Credentials are deleted from provider_links; existing actuals remain.