Hi all, I’m looking to create a ticketing application. The aim would be to sell a user a ticket, and then give them the ability to validate that ticket using the Algo blockchain, yet I’m not 100% sure where to start.
This use case doesn’t exist yet in the examples and I think it’d be cool to flesh out this project and detail exactly how to do it for everyone.
I believe what I need to do is create a smart asset, which I would sell to the user. The part I’m missing is how I could validate the ticket and match it to the user?
The ticket use case is a great one and agree it would be great to have this represented in our examples.
To get you started, I would look at Algorand Standard Assets for creating your tickets. Let’s say you’re creating 1000 tickets for an event (and we’ll assume they are all the same type, fungible). Just create an asset, that has a total supply of 1000, plus name, and all the other options you can customize.
After you create an asset, it will have an ID that is unique on the blockchain. You can use that to confirm whether or not the ticket is valid.
As for matching with the user, depends on what that means for your application. At the blockchain level, usually a blockchain account in a consumer app like this would be associated with a single user. So if you are also looking to associate that account with an identity on your platform, you could just have them provide their public address. I’d recommend using tools like AlgoSigner (for web apps), the Algorand Mobile Wallet and other community wallets for your customers to manage their keys.
When they’re redeeming their ticket, you could have them send you the asset you created. Or just verify that it exists in their account. Whatever makes sense.