Securing Paid Content
There are two main patterns to handle paid content: paywalls and fallbacks. Some projects use one of the two; some projects use both.
Fallback
A fallback may be configured on any overview page. It prevents the article from being opened if the user is not entitled to read it. Instead of opening the content, it will execute any fallback action configured. Mostly, this is the login or purchase. For creating a flow that will allow users to log in and then open the content, see Redirect after Login
Given users may directly access any URL, there might be a need to additionally set up a paywall, see below.
Paywall
Purple Experience supports the creation of paywalls. As on a per customer-basis, different systems and third-party systems are used.
Starting in PXP 5.0, the default behavior for any content API is to only provide the previewHTML for any content. That's the content defined to be free in any case, despite any login or entitlement status.
We define paywall as the UI that will block a user from consuming content he is not entitled to. (For details on configuring entitlements, see Entitlement.)
Often, specific content is marked as paid content, while other content from the same application is available without a subscription.
Paywall behaviour
Any content that is marked as paid will be initially loaded with a paywall. At runtime, we evaluate the entitlement of the user, and based on the result, remove the paywall and display the actual content. With that, we provide the highest safety for the content while allowing for efficient caching policies.
This approach may lead to a flickering behavior when the paywall is removed, depending on internet connectivity or the influence of browser plugins. On very slow connections, users may see the paywall for a longer period of time until the actual content is available.