#damenz-sub-schedule
1 messages ยท Page 1 of 1 (latest)
No, I don't believe there's a way to know this from the Subscription schedule - you'd have to check the Subscription itself. When you retrieve the Subcription Schedule you could expand subscription so that you get the full Subscription object back with the schedule
I can get the subscription item via the sub schedule?
(Without making a second API call)?
Right now it only returns subscription ID, not the object itself
Yup! You'll want to take a look at this: https://stripe.com/docs/expand
damn thats cool ! Really well thought
Ok I got it to expand
Where in the subscription object can I see if it is paid / unpaid?
Is your goal just to see if the latest payment has succeeded? Try expanding subscription.latest_invoice and then check the status on the Invoice.
I want to create a custom dashboard to see
- Frequency of subscriptions
- Price
- Subscription status (Active / pending)
- Last payment (Paid / Unpaid)
is is possible to expand on multiple level ?
Got it
You can expand up to four levels
-
Subscription status (Active / pending)
This you'll get off the Subscription status -
Last payment (Paid / Unpaid)
And this one you'll get off the latest_invoice on the Subscription
Thats an amazing feature.
Is there a way to retrieve multiple scheduled_subscriptions (with expand) in a singgle call ? (batch)?
Lets say I have 30 schedules in my system, do I have to make 30 api call or is there a way to do a batch call?
I tried calling the endpoint without specifying an ID
it seems to work (need to teak expand a little)
Now I just have to use pagination. Ty ๐ I think I am good with this
๐ let us know if you run into anything else!
Hi
https://stripe.com/docs/api/subscription_schedules/object
there isnt much informations about the "Status" of the subscription schedules
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I have a lot of them that are at "released" status but I dont even know what it means
They say "Read more about this here..." but it doesnt say anything about that ahah
released means that the schedule has completed all of its phases and has 'released' the subscription from the schedule (or that the schedule has been manually released). When this happens the subscription will continue on it's current state.
The issue is that i cannot retrieve the subscription item in this case
via the expand
subscription is now null
and the id is now under released_subscription
but it doesn't seems to let me expand released_subscription (which is literally the same thing as subscription, which is the ID of the subscription)
example
req_Xs70oZmZeonXFK
@hollow roost
I am trying to make a single API call to retrieve the following informations:
- Frequency of subscriptions
- Price
- Subscription status (Active / pending)
- Last payment (Paid / Unpaid)
But it seems impossible via the schedule.... since it changes depending if it is released or not. When released, I cannot access the data I need...
Anyone?
Apologies for the delay, yes, once a subscription has been released from a schedule it moves within the schedule object, and as seen here the released_subscription field is not expandable:
https://stripe.com/docs/api/subscription_schedules/object
If you're using the schedule as your entry point, then you may not be able to achieve this with a single call.