#Runayeon

1 messages · Page 1 of 1 (latest)

soft horizonBOT
ripe mulch
#

It's inside the Balance Transaction, coupled with the Charge object

smoky drum
#

Is the id provided the payment intent id?

ripe mulch
#

Charge is inside PaymentIntent

smoky drum
#

Is latest_charge the id? I noticed it just says string. If it is, I assume I grab the balance transaction id after getting the charge.

ripe mulch
#

You would need to expand it

#

like ['latest_charge.balance_transaction.fee_details']

smoky drum
#

Wonder why Im getting

Stripe: Argument "intent" must be a string, but got: [object Object] (on API request to GET /v1/payment_intents/{intent})

after calling "stripe.paymentIntents.retrieve({ id: paymentIntentID })"

ripe mulch
#

req_xxx

#

Probably it's some format error

smoky drum
#

I dont see the request id

#

for getting a paymentintent

#

Not sure if this helps

#

Tried converting to string but that didn't do anything

#

String(paymentIntentID) didnt do much either

ripe mulch
smoky drum
#

I am not seeing it

ripe mulch
#

Hmm okie so that's possibly stopped by the SDK

#

What do you have for console.log(paymentIntentID.toString())

smoky drum
#

It is just printing the pi_xxxxxxxxxxxx

#

I only get the error after calling stripe.paymentIntents.retrieve()

#

Dont think I need to pass the client secret since this is on the server side

ripe mulch
#

Can you paste here your account id? for double check

smoky drum
#

acct_1MRq23JfxEPvJ2b2

ripe mulch
#

Um okie not seeing errored GET request too

#

Can you screenshot the error?

smoky drum
#

Oh

#

I figured it out

#

Its just stripe.paymentIntents.retrieve(paymentIntentID)

#

No need to specify the id or anything

#

latest_charge seems to be an id though, can I still expand that?

#

I assume u meant expand charges to get the balance_transaction id

#

or am i missing something and u can expand with just the id

#

Ignore all that. I realized u meant

stripe.paymentIntents.retrieve(paymentIntentID, {expand: ['latest_charge']})

ripe mulch
#

You can expand 3 levels

#

at once

smoky drum
#

could u give me an example

ripe mulch
#

like expand: ['latest_charge.balance_transaction.fee_details']

smoky drum
#

I see

#

I was wondering how

ripe mulch
#

Maximum in 4 levels

smoky drum
#

so that means 3 periods?

ripe mulch
#

So you should be good to give it a go. If you want something too deep you can always expand 2 times for example

smoky drum
#

Yeah I think I should be good to go. Learned a lot. Thank you