#mp_payment-fx
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1253354055443677285
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Yeah it'll be the balance transaction's amount: https://docs.stripe.com/api/balance_transactions/object#balance_transaction_object-amount. You can find the payment intent's balance transaction by looking at its latest_charge: https://docs.stripe.com/api/payment_intents/object#payment_intent_object-latest_charge. That charge will have the balance transaction id on it: https://docs.stripe.com/api/charges/object#charge_object-balance_transaction
But will that be in the reply for the charge?
Or in a different call... sorry, I am not a developer noob, I have over 25 years of web experience, but I am new to Stripe...
You need to request it
Yeah you'll need to make a request to retrieve the charge: https://docs.stripe.com/api/charges/retrieve. You can also expand: https://docs.stripe.com/expand the balance transaction in that request.
It seems.. oddly complicated just to get the amount in CAD for a USD request
It's how it works
Payment Intent object shows amount charged
You're looking for the amount your account balance changes by not the amount charged
So you'll need to look at balance transaction object
Ok, so how do I chain the calls?
Which field from the charge do I pass tot eh balance?
Wait...
Is GET
/v1/balance_transactions/:id
Is the :id the same as in the charge?
or is that the "source": "tr_1MiN3gLkdIwHu7ixNCZvFdgA",
You just need 1 api call if you already have the payment intent object. The payment intent will have a charge id: https://docs.stripe.com/api/payment_intents/object#payment_intent_object-latest_charge. So you just need to make a retrieve charge api call: https://docs.stripe.com/api/charges/retrieve passing that charge id. In that api call, you'd want to expand: https://docs.stripe.com/expand the balance_transaction: https://docs.stripe.com/api/charges/object#charge_object-balance_transaction.
I guess I am not being clear enough.. sorry...
I make a payment intent and the client pays, I get a payment ID, is that the ID that the balance_transaction expects or is it a difference one?
Not sure what you mean by: is that the ID that the balance_transaction expects or is it a difference one? The id you get back is likely the payment intent id: pi_. That represents a payemnt intent object. You need to go from payment_intent -> charge -> balance transaction. The balance transaction's ID is on the Charge object.
The balance transaction's ID is on the Charge object.
This field:
"balance_transaction": "txn_3MmlLrLkdIwHu7ix0uke3Ezy",
yep exactly
thanks, I am stating to see it
Hi ๐
I"m stepping in as @fleet current needs to head out. It sounds like you have a good handle on the situation now. Is that the case or are you still trying to resolve your situation?
I am still evaluating the the work to the done, bu I think I am almost there
Sounds good ๐