#mckeemi_api
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/1379411341772853390
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ happy to help
yes unfortunately there's nothing else you can do other than changing the billing_cycle_anchor
var newAnchor = new DateTimeOffset(DateTime.UtcNow.Date.AddDays(-2).AddHours(3)).ToUnixTimeSeconds();
var options = new SubscriptionUpdateOptions
{
BillingCycleAnchor = newAnchor,
ProrationBehavior = "create_prorations",
};
var updatedSubscription = subscriptionService.Update("sub_123", options);
Would that be along the right line?
you would need to pass ProrationBehavior = "none"
you don't want to charge your customer for a few hours it would sound off
yes sorry just saw that, but that would update it to be 3 hours later?
oh sorry didn't see that var newAnchor = new DateTimeOffset(DateTime.UtcNow.Date.AddDays(-2).AddHours(3)).ToUnixTimeSeconds();
I don't have to cancel the original subscription?
ok so create an exact timestamp should work, that'seven better so I can say 3 am on the 1st of the month?
yes but that would mean that you would have to use Subscription Schedules
we do use schedules
since the update subscription doesn't allow other than now and unchanged for the billing_cycle_anchor
Is it the schedule I need to update instead?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
you would set the phase to end at the time of your choice (basically 3 hours after the end_period of the current billing cycle) and then in the next phase you would do it for 1 iteration and pass proration_behavior none and set the schedule to release after that
hi! I'm taking over this thread. let me know if you have other questions.