# Monetization

> Ads, web payments, digital goods, subscriptions, and affiliate links for a PWA, and which store or ad-network policy governs each on the web and in a store.

A PWA can earn money through advertising, web payments, digital goods, subscriptions, or
affiliate links. The distribution channel determines which rules apply to the same code.
A checkout falls outside store billing policy when the app is installed from the browser;
the same origin packaged as a Trusted Web Activity and distributed through Google Play must follow Play's billing policy.

## How it works

Store policies apply to the distributed package. The browser-installed copy of your
PWA answers to the ad network's and payment provider's terms; the Play or Microsoft Store
copy of the same origin inherits that store's payments section as well.

### Advertising

Google's AdSense Program policies (last updated 2026-08-04) allow AdSense code on web pages and
forbid it when "integrated into a software application (does not apply to AdMob) of any kind,
including toolbars". The same policy lists the viewing frames in which web ads may be shown
from inside an app: on Android, "Chrome Custom Tabs and Trusted Web Activities"; a plain
`WebView` must instead register through the WebView API for Ads with the Google Mobile Ads SDK.
A PWA installed from the browser is a web page rendered by that browser, so the web rules
apply; a TWA is a named frame; a native shell around a `WebView` falls under the SDK path.
Network-by-network detail is on [Ad networks](/ecosystem/ad-networks/).

### Web payments

On the open web a PWA charges through the [Payment Request API](/compatibility/payment-request/),
a wallet (Apple Pay, Google Pay), or a provider's JavaScript SDK, and no store distributes the page, so no store billing policy applies.
Available payment methods depend on the browser. Firefox
ships Payment Request behind the `dom.payments.request.enabled` preference
([browser-compat-data](https://github.com/mdn/browser-compat-data/blob/main/api/PaymentRequest.json)), and Safari supports only the Apple Pay payment method
([Apple](https://developer.apple.com/documentation/apple_pay_on_the_web/payment_request_api)). The method coverage is on [Payments](/ecosystem/payments/).

### Digital goods inside a store build

Google Play's Payments policy, section 2, requires Google Play's billing system for apps
"requiring or accepting payment for access to in-app features or services" unless sections 3,
8, or 9 apply; section 3 lists physical goods, physical services, bills, peer-to-peer payments,
and gambling as out of scope. Inside a TWA the web page reaches Play billing through the
[Digital Goods API](/reference/capabilities/digital-goods/) in Chrome 101 and later: the page
calls `window.getDigitalGoodsService('https://play.google.com/billing')`, then passes the same
string as `supportedMethods` to `PaymentRequest` with `{ sku }` as method data. The Microsoft
Store is narrower: policy 10.8.1 (version 7.20, effective 2026-10-22) requires the Store
in-product purchase API for games (except games in PC gaming subscription products) and for products on Xbox consoles; other PC products may
use "a secure third-party purchase API". Apple's guideline 3.1.1 requires in-app purchase for
unlocking features, but it applies to App Store apps, and Apple documents no PWA submission route.

### Subscriptions and affiliate links

Play's list of purchases that require Play billing includes "subscription services", so a
Play-distributed TWA sells a subscription through Play billing (Chrome's guide pairs the
Digital Goods API with Payment Request for this) unless section 3, 8, or 9 applies, while the browser-installed copy
keeps using the provider's recurring billing. Affiliate links need no API, and the limit is a
policy one: Play's Spam policy rejects apps "whose primary purpose is to drive affiliate traffic
to a website", so a TWA whose main content is outbound deals is a listing risk. The same page as a browser install
falls outside Play's rule, though AdSense has its own limits on affiliate-driven traffic.

| Path | Browser install | Trusted Web Activity (Play) | Microsoft Store package |
|---|---|---|---|
| Advertising | AdSense web rules | AdSense web rules (named frame) | AdSense web rules plus Store policy 10.10 |
| One-off digital goods | Any PSP | Play billing via Digital Goods API (unless §3, §8, or §9 applies) | Any secure PSP; Store API for games and Xbox (10.8.1) |
| Subscriptions | Any PSP | Play billing via Digital Goods API (unless §3, §8, or §9 applies) | Any secure PSP; Store API for games and Xbox (10.8.1) |
| Physical goods | Any PSP | Any PSP (Payments policy §3) | Payment request or third-party API (10.8.2) |
| Affiliate links | No store rule (AdSense traffic limits if you run ads) | Spam policy if primary purpose | 10.1.1 accurate representation |

## Observed behaviour

:::caution
Chrome's [Play Billing guide](https://developer.chrome.com/docs/android/trusted-web-activity/receive-payments-play-billing) (updated 2021-01-26) states that `getDigitalGoodsService` is
`undefined` on a page served over `http`. For testing on a development device it asks for Android 9 or later in
developer mode, Chrome 101 or newer, and the flag `chrome://flags/#enable-debug-for-store-billing`, which an app
downloaded from the Play Store does not need. Enabling billing in Bubblewrap 1.8.2 or later takes two edits to
`twa-manifest.json`, `"features": { "playBilling": { "enabled": true } }` and
`"alphaDependencies": { "enabled": true }`, followed by `bubblewrap update` and `bubblewrap build`.
:::

According to the same guide, `PaymentRequest` requires `paymentDetails.total`, which Play
billing ignores. A purchase that the backend does not acknowledge is refunded and revoked
after three days.

## See also

- [Google Play Payments policy](https://support.google.com/googleplay/android-developer/answer/9858738) (support.google.com)
- [AdSense Program policies](https://support.google.com/adsense/answer/48182) (support.google.com)
- [Receive payments via Google Play Billing with the Digital Goods API](https://developer.chrome.com/docs/android/trusted-web-activity/receive-payments-play-billing) (developer.chrome.com)
- [Payments](/ecosystem/payments/)
- [Ad networks](/ecosystem/ad-networks/)
- [Digital Goods API](/reference/capabilities/digital-goods/)
- [Monetize a PWA](/guides/monetization/)

← Back to the [Ecosystem](/ecosystem/) overview.