#shaya8089

1 messages · Page 1 of 1 (latest)

mellow condorBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

hoary rock
#

Yes, it does. I don't know if we have docs on this specifically.
Let me look

hexed spire
#

thanks, waiting

hoary rock
hexed spire
#

thanks

I have a had a question in a previous thread linked here above

I have a follow up question:

I'm retrieving a paymentIntent, now I want to expand a nested prop:

stripe.paymentIntents.retrieve(id, {
      expand: ['last_charge.balance_transaction'],
      stripeAccount: getOrgStripeUserId(org)
    });
  }

Should this work, because it doesn't seem to...

Tnx

hoary rock
#

what part doesn't work exactly?

Are you not getting the expansion or is the retrieve request failing?

hexed spire
#

a second, checking

#

so I don't get balance_transaction as an object inside charges
only get the id
(I'm using an older api version where charges is avaialbe on paymentIntent)

hoary rock
#

which API version are you on?

hexed spire
#

2020-08-27

#
stripe.paymentIntents.retrieve(id, {
  expand: ['charges.balance_transaction'],
  stripeAccount: getOrgStripeUserId(org)
});
hoary rock
#

I don't recall last_charge being a thing

#

yup charges was the parameter I believe

hexed spire
#

So my code should give me back an expasionable object for balance_transaction nested in each charge?

hoary rock
#

I think balance_transaction is another expansion

#

IIRC

hexed spire
#

so can I get it somehow when I retirieve a paymentIntent

#

?

#

for its nested charges

hoary rock
#

you need data inbetween
like

  'pi_xxx',
  {
    expand: ['charges.data.balance_transaction'],
    ....
  }
);```
hexed spire
#

please see the attached screenshot I don't get the balance_transaction inside the charges

(test data)

hoary rock
hexed spire
#

I cannot find the requests in my platform account, and not in the connected account either

hoary rock
#

GET requests are omitted by default afaik
you'd need to adjust the filters

#

if not, can you share the connected account ID?

hexed spire
#

Yes i saw, still

hoary rock
#

I can try look it up

hexed spire
#

ok

#

sec

#

acct_1HOi0zBZ8ZBlypAn

hoary rock
hexed spire
#

sorry found it...

#

Hmm

#

So can it be it's impossible to expand it? how can I know for sure?

hoary rock
#

the syntax I shared should work for the older API version, not sure why its failing tbh

hexed spire
#

could be it's different if I do for a connected account?

hoary rock
#

Hmm, good question 🤔
Ah

#

try

const paymentIntent = await stripe.paymentIntents.retrieve(
  'pi_xxx',
  {
    expand: ['charges.data.balance_transaction'],
  },
  {
    stripeAccount: 'acct_xxx'
  }
);```
#

I think expand and stripeAccount needs to be part of separate arguments

hexed spire
#

No, I know for sure that not, I use expand in other place in the code

hoary rock
#

Try it out

#

.retrieve calls are somewhat different from other methods

hexed spire
#

Will do 🫡

#

Yep you're right!