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

# Marketplace Overview

> The OSS pieces that make a multi-tenant x402 marketplace possible — and where to find a hosted instance.

A **marketplace** is what you get when you put many publishers' x402-paid APIs behind one proxy with shared discovery, pricing, and settlement. Faremeter ships the OSS building blocks; an operator runs them as a multi-tenant service.

If you only want to charge for one API, you do not need a marketplace — drop [`@faremeter/middleware`](/server/middleware-overview) into your existing server and you are done. Reach for the marketplace stack when you have **multiple publishers**, **shared infrastructure**, or **a directory of paid APIs** that consumers want to discover programmatically.

## Two ways to participate

<CardGroup cols={2}>
  <Card title="As a publisher" icon="upload" href="/marketplace/publisher">
    Register an API on a marketplace, set per-endpoint pricing, and let the proxy collect payment for you.
  </Card>

  <Card title="As a client" icon="download" href="/marketplace/client">
    Discover paid APIs in a registry and call them with `@faremeter/rides`. No accounts, no API keys.
  </Card>
</CardGroup>

## OSS components

The marketplace stack is published at [github.com/faremeter/marketplace](https://github.com/faremeter/marketplace) and combines:

| Component             | What it does                                                                                              |
| --------------------- | --------------------------------------------------------------------------------------------------------- |
| **Control plane**     | Manages tenants, endpoints, pricing, and wallets. Pushes config to API nodes.                             |
| **API nodes**         | Front clients with nginx, validate payment via the facilitator, and proxy to publisher backends.          |
| **Discovery service** | Searchable registry of published APIs. Serves OpenAPI specs and pricing to consumers.                     |
| **Gateway SDK**       | [`@faremeter/gateway-nginx`](/marketplace/gateway) generates nginx + Lua config for gateway-mode tenants. |

API nodes use the gateway SDK to enforce payment at the edge before requests reach a publisher's backend. Settlement runs through a standard [Faremeter facilitator](/concepts/facilitators), so the same payment schemes you use in the rest of Faremeter work here.

## Hosted vs self-hosted

A marketplace is meant to be operated. You have two options:

* **Use a hosted marketplace.** [Corbits](https://corbits.dev) runs a hosted instance at `api.corbits.dev` with a dashboard for publishers and a public Discovery API for consumers. Pricing, dashboards, and operations are managed for you. See the [Corbits documentation](https://docs.corbits.dev) for sign-up and product details.
* **Run your own.** Deploy the [marketplace](https://github.com/faremeter/marketplace) repo on your own infrastructure. See [self-hosting](/marketplace/self-hosting) for what that involves.

Either way, the **client side is identical**: a Faremeter wallet plus `@faremeter/rides` is enough to discover and pay for any marketplace API.

## How it relates to other Faremeter pieces

* **[`@faremeter/middleware`](/server/middleware-overview)** is what publishers reach for when they run their *own* server and want to charge for it directly. The marketplace is the layer above that — it lets a third-party operator run the proxy on the publisher's behalf.
* **[`@faremeter/rides`](/client/rides-sdk)** is the only client-side dependency for paying marketplace APIs. The Discovery API tells you where the API lives and what it costs; `rides` handles the payment.
* **[Facilitators](/concepts/facilitators)** still settle every paid request. A marketplace operator typically runs a facilitator, but a publisher can supply their own.
* **[Flex](/flex/overview)** is a payment scheme. Marketplaces can offer Flex-priced endpoints when the publisher opts in.

## Where to next

<CardGroup cols={2}>
  <Card title="Publisher path" icon="upload" href="/marketplace/publisher">
    What it takes to put your API on a marketplace.
  </Card>

  <Card title="Client path" icon="download" href="/marketplace/client">
    Discover and call paid APIs from any wallet.
  </Card>

  <Card title="Gateway SDK" icon="server" href="/marketplace/gateway">
    `@faremeter/gateway-nginx`: how API nodes enforce payment.
  </Card>

  <Card title="Self-hosting" icon="wrench" href="/marketplace/self-hosting">
    Deploy the marketplace stack on your own infrastructure.
  </Card>
</CardGroup>
