Subscription or Membership Fee (Unlock Protocol)
Provide subscription- or membership-based access to specific roles and permissions
Last updated
Provide subscription- or membership-based access to specific roles and permissions
Last updated
Overview
Hats has integrated with Unlock Protocol to allow organizations to set up recurring subscriptions or one-time membership fees for roles. When you add a subscription or membership fee to a role, a unique claim page is automatically generated for fee collection and onboarding.
Once a subscription or membership is active, the new member immediately gains all associated role powers, such as access to workspaces, communication channels, and voting rights. If the subscription is canceled or expires, access is automatically revoked.
The module's code is open source and is available here.
Go to the tree that includes the hat you wish to create the module for
Select "Edit Tree"
Locate and select the hat
Open the "Revocation & Eligibility" section
Choose "Add Module". This will open the module creation form
Choose "Subscription Eligibility (Unlock Protocol v14)" in the module type
Fill in the module-specific parameters, shown below.
Withdrawing funds: the Lock Manager address will be authorized to withdraw funds via app.unlock-protocol.com/locks .
One-time purchase: Turn the subscription into a one-time purchase by setting the subscription period to 10 or more years
Choose "Deploy & Return" to deploy the module and return to the hat edit form. The module address will be automatically updated on the hat's eligibility property in the form. Once you deploy these changes, the hat's eligibility will be updated.
ONE MORE IMPORTANT STEP! Copy the address that has now appeared in the hat's eligibility address as shown below. This is the address of the module you just deployed.
Next, mint any hat that is an admin of the subscription-connected hat to this address. Do so by adding the module address you copied as a wearer of an admin hat (you may have to increase the max supply of this admin hat), and click save.
Finally, deploy all your changes onchain.
Once deployed, exit from edit mode and return to the hat that you have added this subscription eligibility module to. In the hat's details, you will now see a "Pay the subscription" link.
Follow this link to see a unique claim page that is automatically generated for fee collection and onboarding.
Once a subscription or membership is active, the new member automatically claims the hat and immediately gains all associated role powers, such as access to workspaces, communication channels, and voting rights. If the subscription is canceled or expires, access is automatically revoked.
Subscription or membership fees collected by the claim page above can be collected by visiting the Unlock Protocol app at https://app.unlock-protocol.com/locks, connecting your wallet, and withdrawing funds, as shown below.
Unlock Protocol and Hats Protocol take a combined 1% protocol and 5% referral fee, respectively, to support the cost of development.