#Babu Munavarbasha

1 messages · Page 1 of 1 (latest)

distant cypressBOT
cobalt smelt
#

pi_3MMRcwRNcO3F2LRl0GoWxIwR

lament wraith
#

Let's continue here. What issue do you have?

cobalt smelt
#

I am trying to get the const paymentIntent = await stripe.paymentIntents.retrieve(data.object.id, {
expand: ['charges.data.balance_transaction'],
},{
stripeAccount: stripeAccountId
});

#

the response does not give charges

#

i use this to record stripe fees on webhook

#

any thoughts?

lament wraith
cobalt smelt
#

so how do i expand?

#

latest_charge.data.balance_transaction

lament wraith
#

Yep!

cobalt smelt
#

okay

#

just to confirm, the same code works on my previous application even now?

#

do i need to update my other apps

#

I just created a new Stripe account for a different application

#

and I am facing this issue only on my new app

#

@lament wraith - I am getting this error on expanding latest_charge

#

message: 'This property cannot be expanded (latest_charge.data).

lament wraith
#

The new Stripe Account will automatically have the latest Stripe API version, which is 2022-11-15 and that's why you have this event format

cobalt smelt
#

latest_charge.data.balance_transaction this doesnt work

#

@lament wraith - Also- so i dont need to update my old app?

lament wraith
#

You simply expand latest_charge.balance_transaction

lament wraith
cobalt smelt
#

okay.. Standard connect, people might be creating connect accounts on my old app. That wouldnt have an issue?

#

I mean new standard connect accounts

lament wraith
#

Yep should be

cobalt smelt
#

you mean there wont be an issue or would have issue

lament wraith
#

there won't be an issue! It's simple that all your system sill work with API version < 2022-11-15

#

Just the newer test account have a different version and different data