How to calculate the tip amount
If you have Tips enabled, then simply calculate the tip amount by subtracting the "payment_intent.amount" from the "payment_intent.amount_received". The difference will be the tip amount.
Tip amount = "payment_intent.amount_received" - "payment_intent.amount".