paywallConfig
object).paywallConfig=...
where ...
is replaced with the URL-encoded version of a JSON paywallConfig
object. The next section will show you how to build this object.redirectUri=...
where ...
is replaced with the URL-encodded address of a webpage where the user will be redirected when their membership is valid.&
sign and you can use online tools such as https://www.urlencoder.io/ to build the encoded version of the parameters.paywallConfig
is a JSON object which includes a set of customizations for your experience. It includes the following elements:locks
: required object, a list of lock objects (see below).icon
: optional string, the URL for a icon to display in the top left corner of the modal.callToAction
: optional object, a list of messages shown based on the state of the checkout modal (see below).persistentCheckout
: optional boolean: true
__if the modal cannot be closed, defaults to false
when embedded. When closed, the user will be redirected to the redirect
query param when using a purchase address (see above).useDelegatedProvider
: optional boolean. To be announced.network
: optional integer. defaults to 1
. See below.referrer
: optional string. The address which will receive UDT tokens (if the transaction is applicable)messageToSign
: optional string. If supplied, the user is prompted to sign this message using their wallet. If using a checkout URL, a signature
query param is then appended to the redirectUri
(see above). If using the embedded paywall, the unlockProtocol.authenticated
includes the signature
attribute.pessimistic
: optional boolean. defaults to false
. By default, to reduce friction, we do not require users to wait for the transaction to be mined before offering them to be redirected. By setting this to true
, users will need to wait for the transaction to have been mined in order to proceed to the next step.captcha
: optional boolean. defaults to false
. If set true
, the users will be prompted to go through a captcha during the checkout process. This is better used in conjunction with a purchase hook that verifies that captcha is valid.network
: recommended integer. See below.name
: optional string. name of the lock to display.recurringPayments
: optional number. The number of time a membership should be renewed automatically. This only applies to ERC20 locks. Read more about recurring memberships.`
callToAction
object lets you customize the messages displayed on the checkout UI. They are all optional strings:default
: displayed by defaultexpired
: displayed when the user had a membership previously that expiredmetadata
: displayed when the user is prompted for metadata1
: mainnet,4
: rinkeby,100
: xdai,137
: polygon.