Allowlists

Use cases

  • Restrict minting to specific email addresses or other social login.
  • Set a dynamic price for each buyer.
  • Provide a discount via coupon code.
  • Set a maximum limit per buyer.
  • Allow some buyers to purchase early.
  • (On-chain allowlist) Allow specific wallet addresses to native mint your NFT.

πŸ”‘ Off-chain allowlists

Paper enables you to customize buying experience by allowing your backend to determine mint eligibility, price, quantity, and more.

Prerequisites

  • The mint method on your smart contract is restricted so all claims must go through your backend and Paper's checkout flow.
  • You've registered your contract.
  • (Optional) You've already collected your buyers' email addresses.
  • (Optional) You manage coupon codes on your backend.

Integration with Dynamic One-Time Checkout Links

  1. Implement the business logic on your backend to determine the eligibility, price, quantity, and any other properties.
    1. Here is where you implement your allowlist, coupons, presale eligibility, etc.
  2. If the buyer is allowed to make a purchase, create a One-Time Link to get a unique URL.
    1. This URL encodes the checkout properties (including the mint method arguments) for this buyer to complete their purchase. The link is invalidated once a purchase is made, and a buyer is unable to manipulate these properties.
  3. Navigate the buyer to that URL.

Integration with Checkout Elements

  1. Implement the business logic on your backend to determine the eligibility, price, quantity, and any other properties.
    1. Here is where you implement your allowlist, coupons, presale eligibility, etc.
  2. If the buyer is allowed to make a purchase, create a Client Secret to get a unique client secret.
    1. This token encodes the checkout properties (including the mint method arguments) for this buyer to complete their purchase. The token is invalidated once a purchase is made, and a buyer is unable to manipulate these properties.
  3. Pass the SDK client secret to render a CheckoutWithCard or CheckoutWithEth component.

FAQ

Why do I need to restrict my mint method?

The blockchain is public and by default, anyone can call your smart contract. You must ensure that savvy buyers can't bypass your backend access logic by ensuring that Paper is calling your contract.

One approach is to restricted your method to be called only by Paper.

Another approach is to generate one-time use signatures on your backend that are required by your mint method. There are many resources online to learn to build signature-based minting.

How can I verify email addresses once I've collected them?

Here are different ways to ensure a checkout is accessible only to a specific email address:

  1. Verify the email in your app.
  2. Verify the email in the checkout flow. Set requireVerifiedEmail: true to require email verification during checkout.
  3. Email the checkout link URL directly. Set sendEmailOnCreation: true to automatically send the One-Time Checkout Link URL to the email address.

How do I achieve an allowlist with a thirdweb contracts?

Thirdweb offers a prebuilt Signature Drop contract that offers signature minting. Paper works out of the box with thirdweb contracts. You can generate the signature on your backend and provide it in the contractArgs parameter when creating an intent.