Paywall
The Paywall is a simple JavaScript library which can track state and emits events based on ownership of keys to specified locks. It can be used to trigger a the Checkout for purchasing keys.
You can easily add it to any webpage with the following:
<script>
(function(d, s) {
var js = d.createElement(s),
sc = d.getElementsByTagName(s)[0];
js.src="https://paywall.unlock-protocol.com/static/unlock.latest.min.js";
sc.parentNode.insertBefore(js, sc); }(document, "script"));
</script>
Configuration
The Paywall shares a configuration object with the Checkout and you can find
everything you need to know in Checkout / Configuration about how to build
out the JSON object you're going use. Then assign it to a global variable unlockProtocolConfig
.
<script>
var unlockProtocolConfig =
{
// paywallConfig object
}
</script>