Loyalty cards programs have been used by retailers to increase customer retention. Loyality cards provide means to identify a particular customer and to collect customer-specific data, thus enabling individualized marketing; however, operating a loyalty program is complicated for retailers since they require to manage balances, collections, and transfers of customers. This is exactly the same problem the retailers were facing before credit cards were readily available. A new problem is that customers now have too many cards, customers may forget, or even deliberately decide to carry only a selection of their cards. This paper proposes a loyalty program based on a blockchain that does not require a physical card for identifying customers as it associates customers to their phone numbers, since nowadays people always carry their phone. In this perspective, companies can reduce overhead costs associated to managing the loyalty program. This paper reviews the technology required and describes the implementation of a loyalty program based on blockchains. Finally, it also enumerates the reasons for choosing the blockchain technology for this application.