#kemel-connect-list-subscriptions
1 messages · Page 1 of 1 (latest)
Hello! Yes you'd use the list endpoint (https://stripe.com/docs/api/subscriptions/list) whilst passing the stripeAccount parameter for the specific connected account: https://stripe.com/docs/api/connected_accounts
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thanks for reply
I can not see stripeAccount in the param list
for subcsription list end point
Which Stripe library are you using?
Something like:
RequestOptions requestOptions = RequestOptions.builder()
.setStripeAccount("acct_xxx")
.build();
SubscriptionCollection subscriptions =
Subscription.list(params, requestOptions);
i see, thank you
i ll try it
Hi again , i just tried
created subscription with platform account
curl https://api.stripe.com/v1/subscriptions
-u sk_test_TRpeYc9q5FHNYipWLIudkwYd:
-d customer=cus_Klj7ypFk0zlBxP
-d "items[0][price]"=price_1K4qcQBXEXgJIGE1HDpaHo5i
-d "expand[]"="latest_invoice.payment_intent"
-d "transfer_data[destination]"="acct_1GGkmFKU6sq3ZaRg"
then tried to fetch with this
curl https://api.stripe.com/v1/subscriptions -u sk_test_TRpeYc9q5FHNYipWLIudkwYd: -d limit=3 -H "Stripe-Account: acct_1GGkmFKU6sq3ZaRg" -G
it returned empty list
Your subscription create call wasn't made on behalf of the connected account - you just created a subscription on the platform but passing a connected account as the destination
should i add on_behalf_of while creating subscription ?
What are you trying to do? I think your wires are crossed
There's no way to list all subscriptions on an account with a specific destination account, no
we have clients, all of them are custom connected accounts
we charge things for them by using destination param
we want to do similar by using subscription api
clients want to see only their subscriptions
does that make sense ?
Yep, got it. So currently your subscription create calls are being made on your platform account. The transfer_data[destination] parameter has no bearing on that – it's just relevant for flow of funds
And as you're using custom accounts it's unlikely you'll be making API calls on their behalf (the platform does the majority of the transacting)
So in this instance you'll likely need to persist the subscription IDs relevant for each connected account somewhere else for you to lookup using the platform API keys