#anthonyg-upcoming-schedule
1 messages · Page 1 of 1 (latest)
I do get an upcoming invoice payload back using the customerID, however, the amounts for the invoice are $0.
can you share a subSchedule ID so I can see how you're creating int
sub_sched_1JpfT9K4OwuAC0l72VAlMUXt
It's saying that the upcoming invoice will be created at 5:27PM CST (1 hour after the created date). So is this why?
Is there a way I can get it to pull upcoming invoice amounts before it finalizes things and charges the card so we can eyeball and make sure it's correct and fix if not?
Check in to see if you have anything.
I'm stepping away but a team member is stepping in and should catch up soon, give them a sec
Hello! Give me a moment to catch up...
I don't believe you can get the upcoming Invoice for a Subscription that doesn't exist yet (like a Subscription that will be created by a Subscription Schedule in the future).
It shows the sub in the dashboard after I create the schedule, but yeah it doesn't list an upcoming invoice. So is there no way to verify price on a schedule until it actually bills the client card???
It shows the Subscription? As in there's a Subscription ID (sub_) immediately after you create the Subscription Schedule?
If so can you provide the Subscription ID?
Actually, the dashboard section says Subscription details, but when you click into it it lists the sub_sched ID instead.
So there's no way to preview amount before charging the card?
Not if the Subscription has not been created yet, no. I mean, you could calculate the total/preview on your end, but you can't get the info from Stripe.
I'm creating these subs from the api in bulk and so that's why I want to verify. So when does the actual sub get created from the schedule whereby I could get the upcoming invoice in it? So if I set the start date to be today at 10PM EST but actually run the api call at 6PM EST, will the sub get created 1 hour from 6PM EST or 10PM EST?
The Subscription will be created on the start_date you specify (which is Thu, 28 Oct 2021 21:27:00 +0000 for the example Subscription Schedule you shared above).
In the details of that sub sched in the dashboard it says will be created Oct 28, 5:27PM
Yep, that time is in whatever timezone you have configured in the Dashboard.
The timestamp above is UTC, as indicated by the +0000 part at the end.
ok, gotcha. So why can't I retrieve whatever object it is that I'm looking at there in the dashboard that's telling me that? Or can I using the upcoming invoice call with the customer ID? Maybe I'm just getting $0 because there's some kind of balance be applied.
You can't get an upcoming Invoice because the Subscription does not exist yet. The Subscription Schedule exists, which will create the Subscription later.
Let me check on something, hang on...
So how come I can view that info in the dashboard then right away, even before the sub has been created?
Oh, you know what, I was wrong! We added a schedule property on the upcoming Invoice API endpoint that allows you to get the upcoming Invoice for a Subscription Schedule with a Subscription that hasn't started yet: https://stripe.com/docs/api/invoices/upcoming#upcoming_invoice-schedule
So if you hit that API with the Subscription Schedule ID specified in the schedule property it should give you want you need.
Bam that's what I'm talking about! Go Stripe! Hahaha
Sorry I steered you wrong in the beginning there!
Wait, so do I not need to use the customer property then? It says you need that if subscription is unset.
No worries! Thanks for sticking with me here!
I think you probably do need customer, but try it without and see if you get an error or not.
Well, actually, it will probably work without now that I think about it.
Yeah, it worked without. Thanks again!
I somehow glossed over that reference to schedule in the api docs when looking at them earlier
I did the same thing! I think I was expecting subscription_schedule. 😅