# Billing

How a campaign is charged for the ads it serves. Prices, minimums, limits and percentages change over time: read them in the Mini App, never quote them from memory.

**Billed per view.** The advertiser pays each time the ad is actually shown to a user. Clicks, and what people do after clicking, appear in the statistics but are **not charged**.

**What counts as a billable view.** A view is charged once, when the ad is confirmed as displayed. Duplicate reports of the same view aren't charged, and neither are ads that were picked but never shown. Spend is written in batches, so a finished campaign's spend can differ slightly from its budget.

**How the price is set.** The price per view is **dynamic**, and the advertiser doesn't set it. When several campaigns compete for the same audience, an **auction** decides which ad is shown. The price then depends on the placement, on where the viewer is, and on how narrow the campaign's targeting is: premium-only and crypto-only targeting each add a markup per view. Never quote a fixed price. The actual average cost of a campaign is in its statistics (CPM), and an estimate is available before launch.

**What the advertiser controls**

- **Budget**: moved from the ad balance into the campaign and spent only from there. The balance side is in https://ad.api.imem.me/docs/balance.md | docs_balance, the campaign side in https://ad.api.imem.me/docs/campaigns.md | docs_campaigns.
- **Daily budget limit**: optional, and caps spend per day. See https://ad.api.imem.me/docs/campaigns.md | docs_campaigns.
- **Targeting**: a very narrow audience can limit delivery before the budget runs out, and costs more per view. See https://ad.api.imem.me/docs/targeting.md | docs_targeting.

**When the budget runs out**, the campaign stops showing and becomes `finished`. Topping up its budget makes it `active` again.

**Where to see spend**: each campaign shows its budget, daily limit and totals, its spend per day, and a history of top-ups and status changes. See https://ad.api.imem.me/docs/campaigns.md | docs_campaigns.
