#abd1hass
1 messages · Page 1 of 1 (latest)
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.
- hassan-schedule-future, 6 days ago, 19 messages
Hello, can you send me the request ID (req_123) of a list request like this that you made recently as well as the ID of a subscription that is not showing up in the list that is returned (sub_1234)?
async function findAllFixedDatedSubscriptions() {
const savedSubscriptions = [];
for await (const subscription of stripe.subscriptions.list()) {
console.log(subscription.status, subscription.id, subscription.cancel_at);
}
console.log(savedSubscriptions);
}
Im running this code. I expect this subscription ID to be returned as it has a status of active sub_1Oj3g3JW5eVJnn2swRRiombx
instead i only get active sub_1OdGcIJW5eVJnn2sDnF2MNhq 1707848914 active sub_1OdGNuJW5eVJnn2szko9ov5L 1707848022
ah let me try find out how to get req id
req_mZRIIpSJAW9oBO
Or maybe there could be a way you can help me. Im trying to find a way to get all subscriptions with a particular product ID and update them.
Initially i thought id get all subscriptions and filter to the product via the Items array. Then do a loop and update the subscription fields.
Thanks for the IDs, looking in to this. I see that one of the subscriptions is on a test clock, so that may be why it is not showing up. Looking further in to this and will get back to you
ah so test clocks dont return back in the list endpoint? most of my test customers have test clocks
Yep that looks to be the case from our description of that parameter https://stripe.com/docs/api/subscriptions/list#list_subscriptions-test_clock
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It looks like we don't show test clock subscriptions without that paramter being set
hmm, thanks for finding that. Am i going about my solution the right way?
in regards to this
is there a way to bulk update subscriptions? im worried about too many requests firing
Apologies that I skipped over that, that is extremely helpful context. You are doing it the right way now by filtering on that ID, looping through, and updating one-by-one. Unfortunately we do not support bulk updating objects like subscriptions so it does have to be done one-by-one