#damenz-sub-schedule

1 messages · Page 1 of 1 (latest)

viscid marlin
heavy kettle
#

that would be the "upcoming invoice" ?

#

but how do I fetch it via the schedule id

#

?

viscid marlin
#

Hi again! Are you asking how to see the price ID associated with the sub schedule after it is created?

heavy kettle
#

Yeah... but I just found it

#

"schedule" parameter of the retrieve an upcoming invoice method

viscid marlin
#

Yep that will work if I understand what you are looking for

heavy kettle
#

Yeah I want the exact price after discount when scheduling a subscription

#

the object itself returns no billing info

#

when created

viscid marlin
#

Ah yeah then if you want the exact price, you want to look at the invoice amount itself.

#

As the Price ID and amount of the Price itself will not include discounts

heavy kettle
#

and since this is not a subscription yet, i have to check the upcoming one right?

viscid marlin
#

Correct

heavy kettle
#

How can I get the interval of a subscription or subscription schedule ?

#

I need the number

1 = monthly

12 = yearly

for example

viscid marlin
#

You retrieve the sub schedule itself and expand the price(s)

heavy kettle
#

is there a way to auto expend when creating ?

#

Or i have to do a second api call?

viscid marlin
#

Yep you can expand when creating.

heavy kettle
#

Nice !

#

is interval_count what I am looking for ?

#

its gonna be 1 for a monthly subscription and 12 for a yearly subscription for example?

viscid marlin
#

interval_count + interval is what you want to look at

#

So with the above it is 1 + month

#

So it is monthly

#

If it had been "year" + 1 then it would be yearly

#

If it is "month" + 3 then it is every 3 months

heavy kettle
#

ok I get it thanks

#

🙂