The OP sent me a private message asking for clarification, explaining they he understood that a private pilot is allowed to request monetary donations for the pro rata operating costs for passengers. I'll give him the benefit of the doubt that this is a legitimate question but post my response here for everyone's benefit.
Yes, a PP may share pro rata operating costs provided there is a common purpose of the flight. Many chief counsel opinions have been written about what constitutes "common purpose", but the common theme is that the FAA tends to take a pretty limited stance on "common purpose". The OP doesn't say what he is proposing but it sounds like he's setting up something that allows PPs with airplanes to provide air transportation. That suggests the possibility of "holding out" air transportation services to the general public...a bit part 135 no no.
Finally, the OP mentions in his message, in addition to collecting "donations", a pilot can receive a gratuity. It doesn't matter what you call the financial transaction; once a PP starts accepting money in exchange for flying he is dangerously close to establishing himself as an illegal charter operation. I don't know if the OP is proposing another online ride-share or an aviation version of Lyft; either way it sounds like a **** magnet for certification action.