Skip to Content
PaywallMonetizationOS (MOS)Overview

Paywall with MonetizationOS (MOS)

MonetizationOS (MOS) is an unopinionated developer platform. This section documents the Sophi setup: an opinionated reference integration a client copies into MOS and adapts to their own site, and the Cloudflare Worker that fronts the site to apply MOS’s decisions.

How the pieces fit together

  1. The Cloudflare Worker (@monetizationos/proxy) sits on the site’s hostname, fetches from the origin, and calls MOS’s surface-decisions API for every HTML response.
  2. The Website Surface Workflow (website-surface) runs inside MOS. It classifies the page, evaluates the applicable feature, and produces a wall decision plus visitor/page context.
  3. Workflow Componentsarticle-body, demeter, and gtm-datalayer — run in parallel, consuming the Surface Workflow’s output to render the paywalled article body, fire Sophi Intelligence callbacks, and push analytics events. They make no decisions of their own.

Everything except the Cloudflare Worker code itself is authored and configured inside MOS (the surface editor), per client — copied from the reference implementations documented here and adapted to that client’s site.

In this section

Guiding principle

Prefer changing the Surface Workflow (or a workflow component) over modifying the Cloudflare Worker whenever a business requirement can be expressed there instead. MOS-side configuration (features, meters, the Surface Workflow) is preferred over Worker environment variables for business logic.

Last updated on