well, it would be better if you gave an example and if there is a specific number that does not match the process ID in the system - the search logic.
Judging by the documentation, you need integration with a login / password + authorization + receiving an extract using the api
https://developer.paypal.com/docs/api/transaction-search/v1/But there is something in the description that you need to be a PayPal partner - I don’t know what the conditions are there, you’ll figure it out yourself.
If you have working access, it will take about 14 hours to receive an extract based on the api
https://developer.paypal.com/docs/api/transaction-search/v1/, by analogy with other actions.