I am using the PayPal REST API.
I need to get the PayPal fee charged from an Invoice.
I have an Invoice ID: INV2-XXXX-XXXX-XXXX
I can get invoice details using and from that, I can get a transaction ID.
false
Now, how can I get the transaction fee from the transaction ID?
I see that a transaction object is returned as part of a payment object, however, I don't have a payment ID from the invoice.
I also don't see a way to get a transaction object from a transaction ID.
How can I get the fees charged by PayPal for an invoice?
References:
https://developer.paypal.com/docs/api/invoicing/#invoices_get