There have been many issues from various people, all asking how to get the transaction fee of a Substrate transaction.
Currently, the only events that are emitted are those from the Balances pallet, which are not specific enough to determine the actual transaction fee in all cases.
We should add a simple event to the Transaction Payment Pallet which emits exactly the final transaction fee, tip, and user to clarify all of this.
Something like:
#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
TransactionPayment { account: T::AccountId, fee: BalanceOf<T>, tip: BalanceOf<T> },
}