# How ZeroClick works

ZeroClick puts an agent-ready storefront in front of your existing API. AI
agents discover your service, purchase a plan, and call your API through a
ZeroClick proxy. You keep your own authentication, your own infrastructure,
and your own pricing. ZeroClick handles discovery, checkout, key
provisioning, metering, and billing.

You integrate once. After that, every plan you publish in the dashboard is
immediately purchasable and usable by agents.

## The flow

1. **An agent discovers your service** through ZeroClick's hosted skill description and MPP & x402 marketplaces.
2. **The agent purchases a plan** at
   `https://{service-slug}.pay.zeroclick.io/plans`.
3. **ZeroClick provisions access** by calling the
   [API key exchange endpoint](/docs/api-key-exchange) you host, trading the
   buyer's identity for an API key.
4. **The agent calls your API** through
   `https://{service-slug}.pay.zeroclick.io/*`. ZeroClick proxies each request
   to your upstream URL and injects the buyer's API key, so requests arrive at
   your API already authenticated.
5. **You report usage** [synchronously or asynchronously](/docs/metering-and-usage)
   so ZeroClick can meter and bill the buyer.
6. **When a plan runs out**, you respond with `402 Payment Required`. The
   agent is directed to `https://{service-slug}.pay.zeroclick.io/extend` to
   top up, then retries.

> **Your API stays yours**
>
> ZeroClick never stores your users' data or rewrites your API surface. The
> proxy forwards requests to your upstream URL unchanged, apart from injecting
> the buyer's API key.

## Core concepts

- **Service**: your API. A name, a description, and the upstream URL
  ZeroClick proxies to.
- **Product**: something you sell from a service. Every product has a
  [shape](/docs/product-shapes) that determines how it is billed:
  pay-as-you-go, subscription, subscription with included usage, or prepaid
  credits.
- **Plan**: a pricing tier within a product, such as Starter or Scale.
- **Meter**: a usage dimension you measure, such as API requests or compute
  runs.
- **Entitlement**: a feature flag attached to a plan, such as
  `support: priority`.

## Payments go directly to you

ZeroClick never holds your money. When an agent purchases a plan at `/plans`
or tops up at `/extend`, the funds move directly from the buyer to the
payment destination you configure in the dashboard. There is no ZeroClick
balance, no payout schedule, and no withdrawal step: the purchase and the
payment to you are the same transaction.

## Next steps

Start with the [Quickstart](/docs/quickstart) to get a service live
end-to-end, or go straight to the [API key exchange](/docs/api-key-exchange)
contract if you're ready to write code.
