Link

How to set up metered paywall?

Step 1: Configure settings

Go to Configure > Metered Paywall Settings on Accesstype dashboard (If you dont find it, reach out to support to toggle it on) and configure paywall for anonymous/logged-in readers based on your need.

The meter is shared for a reader while he is logged in and anonymous.

Note : If you are enabling metered paywall for anonymous as well as logged-in users, ensure story count for anonymous is greater than or equal to that for logged-in. And the duration is exactly the same.

Step 2: Set User with reader Id

Call setUser. Ensure either reader Id or readerIdUrl is passed. If none is passed, it calls the default readerIdUrl, so ensure it is working as expected. You can find sample javascript code for defining this endpoint here.

Step 3: Check access

Call isAssetAccessible method.

Step 4: Pingback

Call pingbackAssetAccess method for updating the meter everytime a metered asset is accessed. The response from isAssetAccessible in step 3 needs to passed for pingback call.