Tulo Paywall Lite¶
Target audience: Developers, Stakeholders
Introduction¶
This document describes how you can integrate with the Tulo Paywall (lite version).
The "Lite" version uses your Payway Organisation ID as the method of authentication rather than a generated JWT token, which makes integrating with the Tulo Paywall easier. However, this also limits what the Paywall can do, and for example Checkout purchases (where the customer never leaves the current page to perform their purchase) are not supported via the Lite version.
If you would like to utilise the Tulo Paywall to it's full potential, we recommend looking at the Standard version instead.
Schema¶
Step 1¶
Create a Tulo Paywall API user¶
To enable communication between your site and Payway you need to create a Tulo Paywall API user.
Info
This should not be the same user as the application rendering the Tulo Paywall. You need a separate API user that will handle all communication with the Tulo Paywall app.
The API user must include the following scopes:
/external/paywall/r /external/paywall/w
Since the communication will be done client-side rather than server-side it will also trigger a CORS request. Hence the API user must allow incoming requests from your domain. To allow client-side requests to the API you need to whitelist your domains that perform the requests to the API user.
Example of whitelisting a domain for an API user
Contact Adeprimo¶
Once you have your API user successfully created, you'll need to contact our support to enable the Tulo Paywalls feature. When contacting our support, the following information must be provided:
- API Key: Can be found and copied in your API user settings.
Step 2¶
Create your first Tulo Paywall¶
Once Tulo Paywalls have been enabled, you will be able to navigate to Marketing => Paywalls in the PAP and create your first paywall. To get started, we recommend you check out our guide in creating a Tulo Paywall.
Step 3¶
Preparing your site¶
Great job! If you got this far, you got your API user ready to go, and your first Tulo Paywall standing by. To start using your paywall, it will now have to be embedded on your site.
Include our CSS¶
For the Tulo Paywall to render correctly, you will need to include our CSS on your site. The CSS defined in this file can of course be overridden in your own CSS if you wish to do so. Choose the correct file, depending on what environment you are working in.
For more information on versions and file locations see available version of Paywall CSS.
Include our Javascript¶
For the Tulo Paywall to function as it should, you will need to include our JS on your site.
For information on versions and file locations see available versions of Paywall Javascript.
When to display the Paywall¶
Your site will need to determine if the Paywall needs to be shown to the end user. The paywall does not itself perform any access control. You can however pass information about the user to the Paywall and it can determine what offer the user will be shown, if any.
User logged in? | User have access? | Action |
---|---|---|
No | No | Show paywall |
Yes | No | Show paywall |
Yes | Yes | Do not show paywall |
Display paywall to logged-in user¶
If you determine the user to be logged in and without access, you will need to include the accountId
of the logged in user when initializing the Tulo Paywall.
Displaying different paywalls¶
You might want to display different paywalls depending on category, type, or any number of reasons. You can do that by including the paywallCode
of the Paywall that you would like to render, when initializing the Tulo Paywall.
You can find the Paywall Code in PAP under Marketing => Paywalls.
If a Paywall code is not passed in, we will instead use the Paywall marked as default for the specified title. You can read more about this functionality here.
Step 4¶
Embedding your Tulo Paywall¶
See the Paywall Javascript documentation for more information on how to embed your Tulo Paywall on your site.
Step 5¶
Events¶
See events for a complete list of what events are triggered, and when.
Step 6¶
Test & go live¶
Once everything above is said and done, we highly recommend you take some final steps before publishing your Tulo Paywall to a production environment:
- Test your Tulo Paywall and implementation in a testing/staging environment.
- Make sure the Tulo Paywall renders correctly, and no errors in the browser console are shown.