Payment contains only one line with total amount, therefore you can’t “drill down” it easily to separate lines.
That info is only in Invoice, but here the problems begin. Even if the Payment is applied to Invoice (so link is established and it is possible to dig out corresponding Invoice lines), remember that there can be partial payments - which line(s) then should be considered paid fully and what to do with line which is not paid fully? And when next payment is made, how to continue this process from the “middle” of partially paid Invoice? Besides, there can be a situation, when one payment covers several Invoices…
Normally you can’t get info from Payment what exactly was paid for (goods, services in DETAIL), unless you:
ALWAYS pay exact amount corresponding to amount due on Invoice, no partial payments, (partial) advance payments or payments covering multiple invoices;