Step 1: Set a Product Purchased Role in SunLicense
When creating a product in SunLicense, you can specify a Product Purchased Discord Role ID. Give this role to users when they purchase the product through your system or any other sales platform.- New product
- Existing product
- Go to the Products page in the SunLicense dashboard.
- Click Create Product.
- Enter all necessary product details.
- Find the Product Purchased Role ID field.
- Enter the Discord Role ID that represents users who have purchased this product.
- Save the product.
Step 2: Assign the role to buyers
Make sure your system (or any other sales platform) grants the Product Purchased Role when a user buys the product. The role acts as proof of purchase.Step 3: Users claim a license with /get-license
Once a user has the Product Purchased Role, SunLicense recognizes them as a valid purchaser. To claim a license, they:
- Join your Discord server.
- Make sure they have the required Product Purchased Role.
- Run the
/get-licensecommand in the designated channel. - Receive their license key immediately.
Users must have the correct role before running
/get-license. This automation removes the need for manual license distribution.