#koen_code
1 messages ยท Page 1 of 1 (latest)
๐ 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/1410461283857334274
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! Gimme a while to read through what you're looking to do
Hi! No problem, take your time. I appreciate your help
hmmmm, can you try creating a subscription schedule on the existing subscription first. Then preview the Invoice with the how you would change the subscription schedule instead
I guess that would be an option, the docs said I could use CreatePreview to see the change a subscription schedule would cause. I was trying to avoid creating it until the customer committed to it, just in case something went wrong while trying to get a preview and the schedule didn't cancel again afterwards
yeah, i get where you're coming from, but I think maybe the problem with that is our preview invoice API takes it as you're trying to create a new subscription schedule, which is possibly why you're seeing it charge the full amount for the first phase. I'm not 100% certain about this though, so you can try and test it out to see if what I suggested works first
I'm fairly certain I could get it working by creating a schedule, getting the upcoming invoice, then cancelling it would work, but I just didn't want to risk the cancelling failing haha
i can't think of a better (or any alternative) option off the top of my head ๐
Ahh so the CreatePreview can never work with an existing subscription, it's always going to assume a fresh subscription is going to be resulting from subscription schedule
So I suppose the only options is to temporarily create a subscription schedule or somehow manually calculate prorations
That's fine, it's not ideal, but I can work with that
yep! what you said is the same as what I had in mind too
Alright, I'll have a crack at that. Thanks for your help!