I'm trying to verify a payment but I'm not sure how to get the TX Key from my history on Monero Wallet GUI.
First note that you can only obtain the private tx key for outgoing transactions, because it's randomly generated by the sender. In the GUI, first go to
History tab. Subsequently, you can obtain the private tx key by clicking on
Details of the relevant outgoing transaction.
Lastly, bear in mind that if you have to rebuild your wallet cache (after you, for instance, deleted it) you'll lose your private tx keys.