Users Buy Random Items


I am looking for something unique, I might need to have someone Develop this outside of Wordpress.

I am looking for a theme, plugins, etc that a users can come to the website and purchase an items (Loot Box/Crate) and then they are sent a RANDOM code to download a video game. I have been looking to email subscriptions, ecommerce, but cant find anything solid. Any help would be awesome.