> ## Documentation Index
> Fetch the complete documentation index at: https://docs.weflayr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sync Revenue

> The Margin page needs your revenue per customer.

## Bring in your revenue

Bring it in from **Costs & revenue** in the sidebar, in any of the following ways:

* **Connect Stripe**: your issued invoices sync automatically, credit notes deducted. Revenue stays current with no manual uploads.
* **Upload a CSV**: export revenue from any billing system and map the columns to Weflayr fields yourself. Useful to backfill history or if you do not bill through Stripe.
* **Push via API**: push revenue programmatically, see the [Revenue API](/api/revenue).

<Frame>
  <img src="https://mintcdn.com/weflayr/swYZJQfBVJ4AL5hK/images/product/settings-sync-revenue.png?fit=max&auto=format&n=swYZJQfBVJ4AL5hK&q=85&s=3350e3476a97ba4fac810de72bc6983e" alt="Sync Revenue tab" width="1568" height="708" data-path="images/product/settings-sync-revenue.png" />
</Frame>

<Note>
  Revenue and AI cost land on the same customer through the `customer_name` you stamp on your LLM calls when [propagating metadata](/quickstart#add-metadata-to-your-llm-calls-for-finer-analysis). With Stripe, you can pass it in two ways: use it as the Stripe customer **name** (default), or set it in a **`weflayr_customer_name`** metadata field on each Stripe customer. With a CSV, map the customer column to it.
</Note>

## Internal projects: key metrics

On an [internal project](/internal-projects), this tab becomes **Upload your Key Metrics**: name your key metrics and upload their values per user as a CSV.

<Frame>
  <img src="https://mintcdn.com/weflayr/swYZJQfBVJ4AL5hK/images/product/settings-key-metrics.png?fit=max&auto=format&n=swYZJQfBVJ4AL5hK&q=85&s=5d540957f82122111b512db7f3c19054" alt="Upload your Key Metrics tab on an internal project" width="1512" height="683" data-path="images/product/settings-key-metrics.png" />
</Frame>
