#veesh_api

1 messages ¡ Page 1 of 1 (latest)

undone karmaBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1344692290119139380

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

lethal ice
#

Hello there

#

I'm not sure I exactly understand what you are trying to do...

leaden star
#

hi, thanks for the swifty response!

lethal ice
#

Can you give me an example

leaden star
#

sure - user currently has 3 seats they are using

#

then, they stop using one

lethal ice
#

And this is usage based billing?

leaden star
#

no, b/c i didn't see how i could bill immediately

#

this is not meant to change frequently, so i have it as quantities for our prices now

lethal ice
#

Okay keep going

#

So they have 3 seats, and what will happen?

leaden star
#

let me add a drop more context

#

each "seat" is an account connected with an ecomerce platform

#

so if they disconnect one account, we want to lower the quantity for the next cycle

#

so it looks like subscription schedules would do that; i just want the schedule to make that one change and then immediately release

lethal ice
#

Gotcha

#

So yeah you still have to set the Subscription Schedule to run until the end of that first iteration

#

Then it will release

#

Really this is no different from it releasing immediately...

#

It just stays attached for that first billing period after the update

leaden star
#

ya, but there aren't webhooks for subscription schedule events

#

so i would have to do bookkeeping on the schedule

lethal ice
#

Hmm I'm not sure what you mean by that?

#

Having a Schedule doesn't prevent the underlying Subscription's Events from firing

leaden star
#

yes, that's true

lethal ice
leaden star
#

right, but there's no specific webhook event which tells me when that is

#

unless i missed

#

it

lethal ice
#

You would do it based on customer.subscription.updated

#

The previous_attributes would indicate that you changed from quantity 3 --> 2

#

You also could set metadata if you so desired and check based on metadata.

#

Really though this is more complicated than it is worth imo

#

Just let the schedule release at the end of that first period after the update.

leaden star
#

alright, thanks for the tips, i think that resolves this

#

i'll just let it release, and if i need to add another phase for whatever reason i can just grab the latest version of the schedule