How can I assign a uuid to each transaction?

This is the first approach that came to my mine as well. Then, your plugin will just ignore the transactions that already have the meta set.