How can I use the paypal API to find out how much I as a seller paid for a shipping label for a given order? When customers check out on my site, shipping cost is bundeled in to the price. The customers pay with the paypal smart buttons on my site but shipping is not itemized and nothing pertaining to shipping is handled by paypal at that time, customers just pay the lump sum total. Later, after they have paid, I visit the order on paypal using a web browser, and I click on the "ship" link to purchase a shipping label. After having purchased it, I can look on the web page for that order and see the amount I actually paid for the label, in a table with fields labeled "Total Shipping Cost", "Total Postage Value", etc. My question is: how can I access these same fields using the API instead of navigating there with a web browser? I saw this article which looks relevant: https://www.paypal.com/us/smarthelp/article/how-do-i-use-the-paypal-api-to-determine-shipping-charges-for-a-transaction-ts1019 but when I use the "get transactions details" API (as described below), using the transaction ID from the order: https://developer.paypal.com/docs/checkout/reference/server-integration/get-transaction/ none of the relevant fields are returned, for example there is no field called "grossAmount" or "TaxAmount" in the returned data structure. The only amounts in the response are 1) the lump sum that the customer originally paid, 2) the paypal transaction fee, and 3) the difference between those. So how do I find how much I paid for the corresponding shipping label after having purchased it?
... View more