You can track these kinds of things in GNU Ledger (cousin of GNUCash)
The expense category is still something like `Expenses:Books:SciFi`, or whatever. The payee for the transaction is then `Amazon`. If you prefer to make the payee the specific retailer that's selling to you, using Amazon as a platform, you can do that, and instead "tag" the transaction with `:Amazon:`.
You can also track points as a byproduct of the transaction, but that's another rabbit hole.
The expense category is still something like `Expenses:Books:SciFi`, or whatever. The payee for the transaction is then `Amazon`. If you prefer to make the payee the specific retailer that's selling to you, using Amazon as a platform, you can do that, and instead "tag" the transaction with `:Amazon:`.
You can also track points as a byproduct of the transaction, but that's another rabbit hole.