#Hernando-connect-subscription

1 messages · Page 1 of 1 (latest)

mild kernel
#

Can you give me the Price id you're passing price_123?

torn spruce
#

yeaH!

#

price_1KROOeGMz3rqpSrZDVEhXBjR

#

you want the connected account too?

mild kernel
#

nah let me see with that first

#

you're making the request on your own Stripe account, so really your code is not passing the stripe_account param properly

#

or that variable is empty

torn spruce
#

ok, let's see, according to the documentation, the way to retrieve to connected accounts data is this:

            $stripeSubscriptions = $this->stripeClient->subscriptions->all(
                ['price' => $stripePriceId],
                [],
                ['stripe_account' => $connectedAccountId]
            );
#

I can confirm that the connectedAccountId variable is there, but is possible that the subscriptions->all function signature is not like that?

mild kernel
#

yeah no

#
$stripeSubscriptions = $this->stripeClient->subscriptions->all(
                ['price' => $stripePriceId],
                ['stripe_account' => $connectedAccountId]
            );```
torn spruce
#

gotcha, it's not like that, it this:

$stripeSubscriptions = $this->stripeClient->subscriptions->all(
                ['price' => $stripePriceId],
                ['stripe_account' => $connectedAccountId]
              );
mild kernel
#

no reason for the empty array in the middle

#

yep!

torn spruce
#

thank you! sorry for this stupid question, but on the 'connected account' section of the document it says like the first one

#

and one last question, is possible to get the total amount of subscriptions instead of a list?

mild kernel
#

no that's not possible you have to count

torn spruce
#

thank you so much for your time!