Connect your revenue and cost providers
This page explains how connectors pull your revenue and costs and how to assign costs to products. It also covers costs from services with no API. Each provider has its own setup page under Integrations.
How a connection works
A connector reads data from a provider with an API key that you create in the provider’s dashboard. Use a read-only key where the provider offers one; the table below lists the access each connector needs, and OpenProfit only sends read requests. In OpenProfit, open Connections, pick a provider, paste the key and click Test. The test calls the provider and shows the account name it found. Click Connect to save the key, encrypted with SECRET_KEY.
The first sync pulls two years of history, or one year on the free hosted plan. Later syncs reread from three days before the last successful sync and replace what changed, so a provider’s late corrections update the earlier figure instead of adding a second one. After an outage, the next sync covers every day it missed. Lines the provider no longer reports are deleted, within the history its API returns.
When a sync fails, OpenProfit retries it an hour later, then waits twice as long after each failure, up to a day. When the provider rejects the key, OpenProfit stops retrying until you click Sync now on the connection.
What each connector reads
Each connector needs a key with specific permissions. The table lists what each one reads and the key it needs:
| Provider | What it reads | Key |
|---|---|---|
| Stripe | Balance transactions, and active subscriptions for monthly recurring revenue (MRR) and the subscription count | Restricted key with read access to Balance, Balance transaction sources, Charges, Checkout Sessions, Invoices and Subscriptions |
| Polar | Paid orders without tax, Polar’s fee, refunds, MRR, active subscriptions | Organization access token with organizations:read, metrics:read, orders:read and refunds:read |
| Paddle | Completed transactions without tax, Paddle’s fee, refunds, credits and chargebacks, MRR, paying subscribers | API key with transaction.read, adjustment.read and metrics.read |
| Lemon Squeezy | Orders and subscription renewals without tax, refunds, MRR, active subscriptions. No fees: the API doesn’t report them | API key, which has full access |
| RevenueCat | Monthly revenue net of taxes and proceeds after store commission, MRR, active subscriptions | Secret API key (v2) with project_configuration:projects:read and charts_metrics:overview:read |
| OpenAI | Daily cost by project and line item | Organization admin key |
| Anthropic | Daily cost by workspace and description | Admin key, available on organization accounts only |
| OpenRouter | Daily cost by API key and model for the last 30 days, excluding bring-your-own-key (BYOK) usage | Management key, which can also create and delete API keys |
| Vercel | Daily charges per project | Access token scoped to the team |
| Cloudflare | Billable usage, or invoices when usage isn’t available | API token with Account · Billing · Read and Account · Account Settings · Read |
| Railway | Monthly CPU, memory, egress, disk and backup usage per project, priced at Railway’s published rates, plus the plan minimum | Account token, or a workspace token with its workspace id |
| DigitalOcean | Monthly cost per project and product, from invoices and the current month’s preview | Personal access token with the billing:read and account:read scopes |
| GitHub | Daily net usage cost per SKU and repository, for an organization or a personal account | Fine-grained token with Administration read access on the organization, or Plan read access on your account |
| Twilio | Daily total usage cost, subaccounts included | Restricted API key with /twilio/billing/usage/read |
| Firecrawl | Credits per API key per billing period, priced at Firecrawl’s published plan and extra-credit rates | Any API key on the team |
| Resend | Transactional emails per sending domain per day, priced at the published fee and overage rates of the plan you pick | API key with full access |
| xAI | Daily cost by billing description, such as a model | Management key |
| Neon | Monthly compute, storage, transfer and branch usage per project, priced at Neon’s published rates | Organization API key |
| MongoDB Atlas | Daily invoice line items per project and stock keeping unit (SKU), including the current month’s pending invoice | Service account with the Organization Billing Viewer role |
Sales tax and VAT
Revenue, profit, MRR and margins leave out the sales tax and VAT your customers pay. OpenProfit stores the tax on each revenue line, in the line’s currency and your base currency. When a period has tax, the overview shows Tax collected under the chart, with the share you file yourself.
| Provider | Tax it records | Who files it |
|---|---|---|
| Stripe | The tax on the invoice or Checkout Session behind each payment, Payment Links included. A refund or dispute takes back the same share of tax. A payment with neither, such as a PaymentIntent your code creates, records no tax, and its tax stays in revenue | You |
| Polar | None. Polar’s metrics leave tax out of revenue and don’t report it | Polar, as merchant of record |
| Paddle | The tax on each transaction, and the tax returned on each refund, credit or chargeback | Paddle, as merchant of record |
| Lemon Squeezy | The tax on each order and renewal, and the tax share of each refund | Lemon Squeezy, as merchant of record |
| RevenueCat | RevenueCat’s monthly estimate: revenue minus revenue net of taxes | You, on the overview. The App Store and Google Play file the tax on their sales, but RevenueCat’s metrics can’t split tax by store |
Stripe needs read access to Invoices and Checkout Sessions to find the tax. A key without them still syncs, but revenue from those payments includes tax.
Assign costs to products
OpenProfit assigns a cost to a product through the provider’s own grouping. These groupings are:
- OpenAI: projects
- Anthropic: workspaces
- OpenRouter: API keys
- Vercel: projects
- Railway: projects
- Cloudflare: zones
- DigitalOcean: projects
- GitHub: repositories
- Firecrawl: API keys
- Resend: sending domains
- Paddle and Lemon Squeezy: products, for revenue
- RevenueCat: projects, for revenue
- Neon: projects
- MongoDB Atlas: projects
Open a connection from Connections to see each grouping with this month’s spend, then pick the product it serves. Past lines move to that product too.
Each grouping is assigned to one product or left unassigned. Lines that belong to no grouping get their own row, and a provider without groupings, such as Stripe or Twilio, is assigned as a whole. When you connect a provider for a product, or your workspace has one product, the first sync assigns every grouping it finds to that product. Anything unassigned counts under All and shows as Unassigned on the overview.
Add costs that have no API
Services like Supabase or a domain registrar don’t expose billing data, and neither do Resend’s marketing plans and add-ons. Add them on the Costs page with Add flat cost, which asks for:
- Name, Product, Amount and Currency: what the cost is, the product it belongs to, and its price
- Billed: Monthly, Yearly, spread over 12 months, or One time for a single purchase such as a laptop
- Category: the expense account the cost goes to in Books, such as Hosting or Software. The tax report depreciates Equipment instead of deducting it at once
- Starts and Ends (optional), or Date for a one-time cost
- Paid with: for an incorporated company, your personal card or a company account, with an optional Since date when you switch
OpenProfit counts a monthly or yearly cost in every month from its start date to its end date, and a one-time cost in full in its month. To stop counting a cost from a given month, set an end date; removing it takes it out of past months too.
Currency conversion
Each workspace has one base currency, set during onboarding and editable in Settings. OpenProfit converts every line in another currency at the European Central Bank (ECB) rate for that line’s date. A workspace in Canadian dollars uses the Bank of Canada’s daily rate instead, as the Canada Revenue Agency (CRA) asks. Currencies the Bank doesn’t publish still use the ECB rate.
Flat costs have no date of their own, so they convert at the rate of the day you save them. When you change the base currency, every stored line converts again at its own date’s rate, and flat costs at that day’s rate.
Changing the base currency also reopens every month you exported from Books. The next export of a reopened month includes all its entries again, in the new currency. Delete the earlier import from your accounting software first, or it counts that month twice.