Payment Transactions on Invoice

I have the InvoicePlane installed on a shared hosting service.
My Clients expect to see on the invoice(maybe at the end of the PDF Invoice), all their history of payments made.
I attempted to customize the Invoice PDF template following the wiki : https://wiki.invoiceplane.com/en/1.0/templates/customize-templates

The wiki was helpful to provide Invoice or Quotes related variables.
But we were not able to find the Payments related variables.
We attempted to use the Database columns names like payment_note from the ip_payments table, but it was not helping and not showing any value.

Request to please help suggesting a solution for this.
Actually, I would say this could also be a feature request for your future releases, as this greatly helps Clients track their payments on one single page like the Invoice.

I was able to add a foreach loop and got this to work.