#Victor Agnez
1 messages ยท Page 1 of 1 (latest)
Hi ๐ just want to make sure I'm understanding correctly, you're asking if you create a usd based Invoice for an Account that settles payments in eur, how do you determine how much eur you received from the payment?
If this question arose from a real Invoice that you're looking at, could you share the ID of that so I can use it as a reference?
@hardy magnet wanted to check in real quick and see if you saw the above message?
yes, thank you, i'm creating an usd invoice to give you the id
the number is : in_1MbnedJbC5FVYozTYxdAfQc3
it is in test mode
I believe you're looking for the amount on the associated Balance Transaction object. You'll need to step through a couple objects to get from the Invoice to Balance Transaction.
The Invoice object has a payment_intent field that points you to the associated Payment Intent object. that has a latest_charge field that points to the associated Charge object. Finally the Charge has a balance_transaction field that points to the associated Balance Transaction object.
The amount and currency on that object should represent the amount settled in your account's balance:
https://stripe.com/docs/api/balance_transactions/object#balance_transaction_object-amount
You can also reference exchange_rate there to see the exchange rate that was used for the currency conversion.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thank you very much. I will test it in api and will reply here if i struggle on something