How can I programmatically get the revenue value in USD (that was deposited into my account) of a sale in a foreign currency?
Example: My online store is US-based, but I charge in CAD for Canadians. A Canadian buys a t-shirt on my online store for $10 CAD using Paypal. Paypal transfers $7.65 USD into my account for this sale (based on the conversion rate at the time of the sale).
I need to report my revenue to the US government in USD.
Using the API and payment_id, I can see the transaction was $10 CAD. But how can I programmatically get the $7.65 USD using the payment_id (or something else)?
You can call GetTransactionDetails API 和 TransactionSearch API to get transaction details。
GetTransactionDetails API https://developer.paypal.com/docs/classic/api/merchant/GetTransactionDetails_API_Operation_NVP/
TransactionSearch API https://developer.paypal.com/docs/classic/api/merchant/TransactionSearch_API_Operation_NVP/