Skip to content
Browse the documentation

Connect your providers

Connect Stripe

Set each customer's revenue from Stripe against what serving them cost, for gross margin by customer.

CostReveal reads what your customers were billed in Stripe and sets it against what serving each of them cost. Revenue is kept apart from spend: it never changes a cost figure.

What CostReveal reads

  • Invoices that are open or paid, excluding tax. Drafts, voided and uncollectible invoices are not revenue.
  • Credit notes that are issued, taken off the revenue of the customer they were for.
  • Charges that succeeded without paying an invoice, less what was refunded. A charge that paid an invoice is that invoice's revenue already, so it is never counted twice.

Each is dated when Stripe created it, in its own currency, exactly, by Stripe's own minor unit for the currency.

The first read brings in the current month and the twelve before it.

Customers

Revenue is matched to customers the way costs are: by a Stripe customer's metadata, read with your project's tag keys for customers, such as customer, client or tenant. A customer whose metadata says customer = globex is the same customer as resources tagged customer = globex. Revenue of a customer with no such metadata is shown as not mapped, never guessed from a name. Changing your tag keys matches revenue again at once.

Revenue and margin

Home shows the period's gross margin. Business, under Customers, shows the period's revenue, its cost and its gross margin, and each customer's revenue, cost and margin. Cost explained by no customer yet is its own row.

Set it up

  1. In Connections, choose Connect next to Stripe.
  2. In the Stripe Dashboard, under Developers, API keys, create a restricted key with Read access to Invoices, Credit notes, Charges and Customers, and nothing else. A secret key is refused.
  3. Enter the key.

CostReveal reads this month's invoices, credit notes and charges before saving anything. The key is stored encrypted and never shown again. Deleting it in Stripe ends access at once.