Search code examples
paypalpaypal-sandboxpaypal-rest-sdk

How can a paypal developer see the transaction details?


We are using Paypal as our payment backend, and we want to automate the accounting process at the end of each month, i.e.,

  1. Get the sum of all the received payment each month
  2. List all all the received payment -- how much each transaction is

After making the paypal transaction, I can get the orderID info below:

enter image description here

I logged into my paypal console, I can see the list of API calls.

enter image description here

First of all, the API call IDs on the console do not seem to meet the orderID, is there a way for us to find the relationship?

How can we do accounting based upon the history of API calls listed on the console? Or is there any management API for us to do payment history investigation?


Solution

  • Payment approval isn't an important step for accounting purposes, forget about that data.

    When a payment is captured, purchase_units[0].payments.captures[0].id is the PayPal.com transaction ID, and that same data can later be obtained with this API call: https://developer.paypal.com/docs/api/payments/v2/#captures_get

    That's the relevant accounting data, for a single transaction.

    To get the data for multiple transactions, use PayPal.com reports. There is a Reports tab, you can download transactions for a month in CSV format.