#mp_payment-fx

1 messages ยท Page 1 of 1 (latest)

charred gateBOT
#

๐Ÿ‘‹ 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.

fleet current
acoustic basin
#

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

fleet current
acoustic basin
#

It seems.. oddly complicated just to get the amount in CAD for a USD request

fleet current
#

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

acoustic basin
#

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",

fleet current
#

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.

acoustic basin
#

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?

fleet current
#

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.

acoustic basin
#

The balance transaction's ID is on the Charge object.

This field:

"balance_transaction": "txn_3MmlLrLkdIwHu7ix0uke3Ezy",

charred gateBOT
fleet current
#

yep exactly

acoustic basin
#

thanks, I am stating to see it

small gazelle
#

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?

acoustic basin
#

I am still evaluating the the work to the done, bu I think I am almost there

small gazelle
#

Sounds good ๐Ÿ‘

cold tapir