I tried to use the transaction hash, but that seems to be something different than tx_id. For example with this:
I got an error "no tx key found for this txid".
Monero Stack Exchange is a question and answer site for developers and users of the secure, private and untraceable cryptocurrency Monero. It only takes a minute to sign up.Sign up to join this community
Transaction hash, transaction id, txhash, txid, are all terms for the same thing.
When you send a transaction, the tx key will be saved in your wallet cache (assuming you have this enabled, this is the default for most wallets, but for a short time after this feature was coded, it was not the default. Use
set store-tx-info 1 to enable, in case it's off).
If you remove your wallet cache, this will be removed. If you need to remove your wallet cache, and you think you may need the tx keys, you can write them down or save them in a text file). Unfortunately, the wallet cache sometimes becomes corrupt, and it will be made into an LMDB database in the near future to avoid this.