PHP code to extract payment transaction information


I’m creating a PHP function to report on the latest payments processed and I’m needing to extract the same information that is available in the standard Infusionsoft ‘Payments Report’

In particular I’m looking for the following fields from the payments report
Id , Contact Id, FullName, Billing Country, ProductIds, Product Names, Return, Sale Total, Pay Amt, Pay Type, Date Sent, Date

I am assuming that there would be unique sequential Id for all payment transactions and would ideally like to be able retrieve the transactions since the last download, so I would be able to request all records where the payment transaction Id is greater than the last downloaded payment transaction Id.

Can anyone help provide some code examples that would support this?

I’m a total newbie when it comes to PHP so Please be patient.

Thanking you in advance for any support