Skip to content

Leaky Paywall

How to give readers free access to a limited number of articles before requiring a subscription.

Overview

A leaky paywall (also called metered access) lets readers view a set number of articles within a time period before the paywall appears. This is a common strategy for converting casual readers into subscribers -- they get enough value to want more.

How it works

  1. A reader visits a premium article
  2. Sesamy checks whether the reader has remaining free views in the current period
  3. If views remain, Sesamy grants access via a signed link and decrements the counter
  4. If the allowance is exhausted, the paywall is shown

The counter and time period are configured per paywall in the Sesamy dashboard. Common configurations:

ConfigurationBehaviour
3 articles per monthReader can view three premium articles each calendar month
5 articles per weekReader can view five premium articles each week
1 article per dayReader gets one free article each day

Integration

Leaky paywall works transparently with both Capsule and the <sesamy-content-container> lock modes. When sesamy-js checks access via paywalls.checkAccess, the API returns either:

  • status: "allowed" with a signed link -- the reader has free views remaining
  • status: "blocked" -- the allowance is used up, show the paywall

sesamy-js handles this automatically when a paywall is configured with metered access. No special client-side code is needed. If you consume the signed link on your own backend (for example, to render a gated article server-side), see Token Validation.

With Capsule

When using Capsule, the access check happens before the unlock call. If leaky paywall grants access, sesamy-js uses the signed link token to unlock the DCA content.

With sesamy-content-container

When using lock modes like proxy or encode, the same access check runs. If leaky paywall grants access, the content is unlocked as normal.

Configuration

Leaky paywall is configured per paywall in the Sesamy dashboard:

  1. Navigate to the paywall settings for your vendor
  2. Enable metered access
  3. Set the number of free articles and the time period
  4. Save -- the changes take effect immediately

The paywall must be referenced in your content via the settings-url attribute or the paywallUrl content configuration.

Reader identification

The leaky paywall counter is tied to the reader's identity:

  • Authenticated readers: Tracked by their Sesamy user ID. The counter persists across devices.
  • Anonymous readers: Tracked by browser session. Clearing cookies resets the counter.

For the most reliable experience, combine leaky paywall with a login requirement after the free allowance is exhausted.

Next Steps

Released under the MIT License.