Get payment history on Paypal API

2020-04-26 06:42发布

问题:

I need to find a way of getting a Paypal account holders payment history using the Paypal api. If we have a user's consent (i.e. we've already used the Permissions API to redirect them to Paypal, and they've consented to give us permissions to get details of payments to their account), what's the next step?

I've seen a similar question here which talked about using GetTransactionDetails call, but that seems only to get details for a single transaction. Another answer mentioned the Payment.List method, but didn't give an example of how it's used.

Can anyone point me in the right direction?

回答1:

I would recommend using the TransactionSearch API. This will let you get a list of transactions (up to 100 at a time). You can then use the GetTransactionDetails API to get more information on individual transactions.

https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/TransactionSearch_API_Operation_NVP/