#tomas at amenitiz

1 messages ยท Page 1 of 1 (latest)

outer brambleBOT
hushed coral
#

Hello ๐Ÿ‘‹
Not sure I completely follow. What exactly do you mean by "method chain" here?

robust rivet
#

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)

hushed coral
#

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

robust rivet
#

Thanks, I'll look into it ๐Ÿ™‚ You are doing the lord's work here