#tomas at amenitiz
1 messages ยท Page 1 of 1 (latest)
Hello ๐
Not sure I completely follow. What exactly do you mean by "method chain" here?
Yeah, my bad! Let's say I retrieve an invoice object, and it's marked as paid. The invoice is in USD, but I know I collect in EURO. Is there a way I can retrieve elements through the API, starting with the invoice, so I can get both
- the amount in EURO I will receive
- the amount in USD the customer paid
- consequently, the exchange rate that was applied
?
Thanks ๐
In other words, what is the best pathway (which objects should I retrieve) from the data available in a paid invoice, in order to get this data (if it is obtainable at all)
I believe you'll need to look at the BalanceTransaction of the underlying PaymentIntent for this
https://stripe.com/docs/api/balance_transactions/object#balance_transaction_object-exchange_rate
So you go from Invoice -> PaymentIntent -> BalanceTransaction -> exchange rate
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thanks, I'll look into it ๐ You are doing the lord's work here