Individual candidates are required to report both donations and spending, listed by donor and by expenditure. These reports are available to the public in all kinds of forms, from a horribly structured giant spreadsheet to CSV to searchable lists often created by third parties. So if the candidate can't explain where money came from to the penny, it gets seized and they pay huge fines. PACs to some extent as well.
But then there are things like so-called "Super PACs" and outright "dark money" groups entirely exempt from disclosure. The genuinely wealthy might prefer their campaign dollars not be denominated in anything but the name Benjamin.