#anthonyg-upcoming-schedule

1 messages · Page 1 of 1 (latest)

frozen relic
#

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

snow sand
#

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.

frozen relic
#

I'm stepping away but a team member is stepping in and should catch up soon, give them a sec

abstract spear
#

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).

snow sand
#

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???

abstract spear
#

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?

snow sand
#

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?

abstract spear
#

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.

snow sand
#

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?

abstract spear
#

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).

snow sand
#

In the details of that sub sched in the dashboard it says will be created Oct 28, 5:27PM

abstract spear
#

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.

snow sand
#

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.

abstract spear
#

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...

snow sand
#

So how come I can view that info in the dashboard then right away, even before the sub has been created?

abstract spear
#

So if you hit that API with the Subscription Schedule ID specified in the schedule property it should give you want you need.

snow sand
#

Bam that's what I'm talking about! Go Stripe! Hahaha

abstract spear
#

Sorry I steered you wrong in the beginning there!

snow sand
#

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!

abstract spear
#

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.

snow sand
#

Yeah, it worked without. Thanks again!

#

I somehow glossed over that reference to schedule in the api docs when looking at them earlier

abstract spear
#

I did the same thing! I think I was expecting subscription_schedule. 😅