Unlock Guides

Back

How to Sell NFT Tickets for an Event

A ticket to a conference, a concert or a meetup is a membership to that event. With Unlock, you can easily sell tickets to events you organize.

Introduction

NFT ticketing is hot, and events such as the 1800-attendee EthCC conference are implementing NFT-based ticketing for their events. In this guide, we’ll show you the basics of how to set up an NFT ticketing system for an event, from setup through launch through the physical check-in of attendees the day of the event itself.

NFT ticketing setup

Setting up your smart contract

To begin, you’ll need to set up the smart contract for your tickets. This smart contract will mint the tickets for your attendees, handle payments, and is the blockchain mission-control center for your event. The Unlock Dashboard provides the easiest interface to deploy your NFT ticketing smart contract, or “lock.”  Please, follow these instructions these instructions on how to create your lock. There are a few considerations in setting up your lock:
  • What’s the name of your event? Use that for the name of your lock.
  • Is your ticket visual? That is, does your ticket have artwork or a design that you want attendees to see? If so, have that artwork file available.
  • How many tickets do you want to sell, at what price, and in which currency?

How to handle multiple types of tickets

You can deploy one or more locks. If you have different tiers of attendees (e.g. general admission, VIP, staff, sponsor, etc.), you’ll want to create a unique lock per class of tickets.

You will also want to create different locks if you have multiple types of tickets, for example a limited number of “early bird” tickets, or tickets which provide multiple admissions (day 1 workshops and day 2 conference, etc.).

Selling tickets on your website

Setting up the checkout

Once your locks have been deployed, you can deploy them on your own site using our paywall application. The paywall application manages the checkout process for the ticketing experience.

First, add the following snippet to load Unlock’s paywall application.

				
					<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>
				
			

Then, you need to configure the paywall application to work on your own site. Here’s a basic configuration:

				
					var unlockProtocolConfig = { 
  locks: {
    '0xabc': { 
      // 0xabc is the address of a lock, obtained from the dashboard
      network: 4, // Use here the chain id of the network on which your contract was deployed
      name: 'Developer Conference' // this is optional
    }
  },
  icon: 'https://url-of-your-logo', 
  callToAction: { 
    default: 'Purchase your ticket to attend the conference!',
    pending: 'Your transaction was sent. It may take a few minutes to go through and you will receive it once it did.',
    confirmed: 'You already have a ticket. Please make sure to check your key chain to view it!',
    noWallet: 'You do not have a wallet yet. Please install one.',
  }
}
				
			

After this, you need to add a button to your web page that future attendees have to click on in order to purchase their tickets. This button needs to handle the onClick event and call the following function window.unlockProtocol.loadCheckoutModal() .

				
					<button onclick="window.unlockProtocol.loadCheckoutModal()">Purchase ticket</button>
				
			

Collecting attendee information

Most events will need to gather some attendee information (name, email address or tee-shirt size for example). For this, you can simply add some configuration to your paywall. Please refer to the advanced paywall configuration page for more details.

In a nutshell, you just need to add a field called metadataInputs to your configuration. This field contains an array of of values you want to collect. Here is for example how you would collect email addresses and names.

Important: If a field is of type email and has the name email, then we will use it to send email notifications to your attendees to confirm they have a ticket with a link to the Unlock keychain where they can print a QR code.

				
					var unlockProtocolConfig = { 
  locks: {
    ... // see above
  },
  metadataInputs: [{
    name: 'Full Name',
    type: 'text',
    required: true,
   }, {
    name: 'Email',
    type: 'email',
    required: true,
   }
  ]
}
				
			

If you decide to collect emailAddress, then, we will automatically send an email to that address when their purchase is complete!

Listing all attendees

As an event organizer, you may want to list the attendees coming to your event. This is possible through the Unlock Dashboard. On that page, click on the members icon

On your lock in the list of locks. On the next page, you will be able to list all of the key owners (attendees who have RSVP) as well as the information that you have collected.
You can export the list as CSV from that page.

Attendee QR code tickets

Attendees receive a Non Fungible Token in their wallet when they purchase a ticket. This NFT is their ticket. However, to prove that they own the NFT, they can generate a unique QR code.

For this, they can use the Unlock key-chain. The key-chain lets user manage all of their Unlock keys, including, of course, their tickets to your event.

On each of their keys, a button lets them generate a QR code which is a cryptographic signature of their NFT. They can even choose to receive this QR code by email, should they want to use it without their crypto-wallet or the key chain.

The QR code cannot be forged, which means that a verifier can instantly make sure that it is valid and was indeed signed by the owner of a ticket.

Attendee check-in at the event

Congratulations! You’ve made it to the day of the event. On the day of your event, you will ask attendees to show you their QR codes, per the section above.

Checking attendees in

Verifier UI

The attendee’s QR code can be scanned with a mobile phone camera application. The application will prompt the web browser to open the verification URL. This URL, once loaded, will show whether the ticket is indeed valid.

Additionally if the verification URL is loaded from a web browser which has the same crypto wallet as the lock creator, then the verification page will show all of the tickets’ collected attendee information.

Additionally, a button will be visible to mark the ticket as “checked-in”. This step can be done at any point, and after that, the ticket will forever be marked as having been used. This means that the next time the ticket is scanned, a message will indicate that the ticket has already been checked-in. This prevents someone from “re-using” the QR code that someone else already used.

Setting up your “verifiers” to check in attendees

Using a regular mobile phone camera, anyone can scan the QR code of any Unlock Protocol NFT to see if it is valid. However, to check-in a ticket so it can’t be reused, individuals, called Verifiers, can additionally mark tickets as “checked in” using a convenience application provided by Unlock. Verifiers are usually stationed at the entrance to the venue and check individuals in as they enter the venue or when they pick up their swag bag, badge, or lanyard.

In the weeks leading up to the event, a Lock Manager will need to set up one or Verifiers using the Verifiers page in the Unlock Dashboard (see “Setting up Verifiers with the Verifiers Dapp” below for detailed instructions). This is to ensure that only verifiers are able to check-in tickets at the venue.

There are two ways for Lock Managers to add approved verifiers:

    1. If the Lock Manager knows the wallet address of every individual who will be a verifier, the Lock Manager can set each verifier up individually in the Verifiers page in their Dashboard.
    2. Alternatively, if a large number of individuals will act as Verifiers for a particular event, the Lock Manager may choose to set up a single Unlock Account with an email and password, and have all the Verifiers sign into the verification system using that one shared Unlock Account. This reduces complexity through having a single shared verifier account, instead of the Lock Manager needing to manage a large number of verifier wallet addresses in the verification system (one for each Verifier).
 

Once a Verifier is set up in the Verifiers page of the Dashboard, they can immediately use their smart phone camera to check in tickets.

To check in attendees, a Verifier needs to do the following

  • Turn on their smart phone and go to the verification page using their smart phone browser: http://app.unlock-protocol.com/verification
  • Log into the verification Dapp from their phone with either an Unlock Account using an email and password provided by the Lock Manager, or by connecting to the verification Dapp with their wallet (depending on how the Lock Manager has set up the Verifiers)
  • Allow the use of their camera
  • Scan a ticket

The attendee must present their QR code for it to be scanned. If the individual has lost or misplaced their QR code, the Lock Manager can send the attendee their QR code again from the lock’s members page.

If a ticket has previously been scanned and is marked as checked-in, information about the last check-in time will be visible and the ticket will have an orange background.

Attenedee Status

Other features and capabilities for NFT tickets

Airdropping tickets to attendees

An event organizer may wish to give away or “airdrop” NFT tickets for free to certain individuals. This can be done directly through the Unlock Protocol dashboard, or programatically. Airdropped tickets can be sent to a single individual, or a group. You can learn more about airdrops with Unlock in “Airdrops for NFT memberships.”

Airdrop Keys in Member's UI

Sending ticket QR codes via email

As noted above, the Unlock creator dashboard includes the functionality where a Lock Manager can airdrop keys to a list of recipients. You can also send an email simultaneously when airdropping a ticket to a recipient, or at any time via the Unlock Dashboard, as shown below.

Sending QR code from the member list

The email generated will include a QR code of the signed NFT that an attendee can use to prove that they own it when attending in-person events and a link to view their NFT.

Attached QR in the email

Making tickets non-transferable

The contract for any ticket can be set so that the tickets issued by that lock are non-transferrable to prevent secondary market sales or transfers. You can learn more about this capability in the document “How to make keys non-transferrable.”

Cancelling a ticket

In certain instances, an event organizer may want to cancel a ticket due to changes in circumstances, an attendee running afoul of terms of service, or another reason. In this situation, an event organizer can cancel a ticket, and optionally offer a refund of the ticket price.

Setting up Verifiers with the Verifiers Dapp

The Verifiers page is a page in the Unlock Dashboard that enables a Lock Manager to set one or more wallet addresses as Verifiers. Verifiers are trusted users at an event who can use a smart phone camera to scan a ticket QR code at the check-in to a venue and mark a ticket as checked-in. Checking a ticket in prevents double-use of NFT tickets. Once a ticket has been checked in, it is marked as such.

While anyone can use a smartphone camera to scan a ticket for validity, only wallets that have been set up as Verifiers can check-in tickets and mark them as “used.”

When a Verifier’s mobile wallet is connected and the Verifier scans a ticket’s QR code with their smart phone, the Verifier can:

  • Mark a ticket as checked-in
  • See the ticket’s metadata

Verifiers page and Lock Managers

The Lock Manager can perform the following actions on the Verifiers page:

  • See list of all the Verifiers
  • Add new Verifiers
  • Delete an existing Verifier

 

Testing the Verifiers Dapp

 

A Lock Manager should test that they can perform the following actions for their ticketing lock:

 

  • Add new Verifiers from Verifiers page
  • Remove Verifiers from Verifiers page
  • View the list of Verifiers from Verifiers page
  • Mark a ticket as checked-in
  • View metadata for a scanned ticket

 

A Verifier can only perform tasks that are needed to review and check-in tickets at the venue. A Verifier should be able to:

  • Mark a ticket as checked-in
  • View metadata for the scanned ticket

 

Note: If a large number of individuals will act as Verifiers for a particular event, the Lock Manager may choose to set up a single Unlock Account with an email and password, and have all the Verifiers sign into the verifiers page using that shared account. This reduces complexity through having a single shared verifier Unlock Account, instead of managing a large number of verifier wallet addresses in the verification system (one for each verifier).

 

Using the Verifiers page in production

 

Was this article helpful?
YesNo

In order to sell NFT tickets for your events, please make sure you have create the lock beforehand. If you would like to accept credit card payment, also make sure the payment is already set up in the dashboard.

Table of Contents