#pl_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/1277481994762195007
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- pl_api, 3 days ago, 7 messages
- pl_invoice-types, 3 days ago, 25 messages
- pl_api, 6 days ago, 21 messages
Hi there, so you want to change the billing_cycle_anchor for the next renewal?
yes, I know there is a billing_cycle_anchor for subscrition updates, but it looks like it can only be continued (unchanged) or reset from now (now).
Is there any way to set the time specifically?
https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_cycle_anchor
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 can to use subscription schedule and let it set the billing_cycle_anchor when the 2nd phase starts
{
items:[
{
price: PRICE_ID
quantity:1
}
],
end_date: new Date("Sep 26 2024 0:00").getTime() / 1000,
},{
billing_cycle_anchor: 'phase_start',
items:[
{
price: PRICE_ID
quantity:1
}
],
proration_behavior: 'none'
}
]```
Something like this
Can I use a subscription schedule for immediate updates?
I want to specify 00:00 on the day when I want to renew a subscription, but I want the renewal itself to be processed at the moment of request.
So you want to backdate the subscription, and immediately renew it? Why?
It means that the first phase of the subscription schedule can be set to a past time.
The subscription schdule API doesn't support backdating
The subscription subscription start time is also set to 00:00, but the application side that uses this Stripe handles this on a date basis, so we want to align the criteria for the subscription/renewal date. The background is that the application data is set to 00:00, so we want the Stripe data to be aligned to 00:00 as well to make it easier for users to understand.
Hmm, actually I found it confusing.
end_date: new Date("Sep 26 2024 0:00").getTime() / 1000,
Is this not the intention, that the past can be set?
The subscription should start when the customer subscribes.
No you can't set end_date to a past date.
The rule itself, that the date should be 00:00 on the day of the event, should not be a problem if the terms of reference are taken into account. (Although the opinion that it should be at that moment is correct.)
In fact, stripe allows a time to be specified when creating a subscription. Can this also be done at the time of renewal?
No you can't set end_date to a past date.
ok.
If you want to change / set what we call billing_cycle_anchor, that can be done too : https://docs.stripe.com/billing/subscriptions/billing-cycle
This is at create, right? I've linked it, but the api at update doesn't seem to allow that setting, no?
https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_cycle_anchor
billing_cycle_anchor
string
Either now or unchanged. Setting the value to now resets the subscription’s billing cycle anchor to the current time (in UTC). For more information, see the billing cycle documentation.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hi @jagged sage have you tried the subscription schedule that I mentioned in the very beginning?
I heard that you can't use past dates for that?
No you can't.
If so, what does it mean to try a subscription schedule?
I have used subscription schedules before. I have used it for downgrade functions that specify a future date.
I have another idea, you use subscription API to create a subscription with backdate, and later create a subscription schedule to change the billing_cycle_anchor in phase 2 start