# Sell an API

URL: /products/api/sell · Id: `page:products/api/sell`

> How an API earns, from the Offer that grants its Verbs to the Meter, the prepaid balance and the 402 that tells any caller what to buy.

An [Offer](/business/nouns/offer) sells an API: its [Entitlements](/business/nouns/entitlement) grant the [Verbs](/business/nouns/verb), its [Limits](/business/nouns/limit) count them, and its `atBound` says what happens past the count. A caller outside its Offer is told exactly what to buy.

## What the Offer grants

**Leaseline**

Leaseline sells its API inside its [App](/business/nouns/app) plans. The `portfolio` Offer grants unlimited units and API access, and Harbor Residential has held it since month 3.

| Offer | [Price](/business/nouns/price) | API access | Past a Limit |
| --- | --- | --- | --- |
| `free` | $0 a month | None | `upgrade` |
| `pro` | $29 a month | None | `upgrade` |
| `portfolio` | $99 a month | Every Verb in the [Product](/business/nouns/product) file | `overage` |

**In another business**

Ratebook serves sales-tax rates to online checkouts and sells nothing but its API.

| Offer | Price | Calls | Past the Limit |
| --- | --- | --- | --- |
| `starter` | $49 a month | 10,000 `Collection.query` calls a month | `upgrade` to `scale` |
| `scale` | $199 a month | 100,000 calls a month, plus `Collection.export` | `overage` through the [Meter](/business/nouns/meter) |

[`Offer.grant`](/business/nouns/offer/grant) adds one Entitlement at a time. [API plans, limits and uptime](/products/api/plans-and-uptime) covers quotas and rate limits.

## Metering
A Meter counts each metered call once, as an [Entry](/business/nouns/entry). Usage is reported to Stripe each hour and billed on the period's [Invoice](/business/nouns/invoice).

## Paying ahead
A [Customer](/business/nouns/customer) can pay ahead. An Offer that sets `credit` issues a [Credit Grant](/business/nouns/credit-grant) with each purchase, and every metered call draws it down. Before each call the balance is checked as a Limit; at zero, the Offer's `atBound` applies.

`Customer.creditRecharge` buys another pack when the balance falls below its floor. [Credits](/systems/finance/credits) has the order of use, expiry and settlement.

## The 402
A call outside the caller's Entitlements gets `402` [`payment-required`](/code/api/errors/payment-required). The reply is a problem document on the [Startup](/business/nouns/startup)'s own error namespace, and its `next` link accepts the Offer that covers the call.

```json
{
  "type": "https://leaseline.app/errors/payment-required",
  "title": "Payment required",
  "status": 402,
  "detail": "renew is part of offer portfolio at $99 a month.",
  "fix": "Accept the Offer named in next, then retry the call.",
  "next": "https://api.leaseline.app/offers/portfolio/accept"
}
```

An [Agent](/business/nouns/agent) reads the reply, accepts the Offer, pays under its own [Mandate](/business/nouns/mandate), and retries with the same idempotency key. [Selling to agents](/products/selling/selling-to-agents) covers unknown Agents and their first Limits.