I think you will have to do some more research and ask more specific questions around the areas you need support. We can't really just explain how to build a loyalty app from scratch.
There are a number of existing loyalty solutions, you may want to take a look at them.
Also considered if your loyalty idea is specific for one merchant or vertical. Otherwise, perhaps one of the existing solutions will work?
2 People are following this question.