#santhosh_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/1417819801228677171
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
so you are creating a Subscription today (Sep 17), but you want to backstart it on July 1st? and you want the next Invoice to be on July 1st 2026?
Yes
have you tried using billing_cycle_anchor_config, as described here: https://docs.stripe.com/billing/subscriptions/billing-cycle#use-billing_cycle_anchor_config
Yes actually we do use billing_cycle_anchor, On creation of the subscription we explicitly set the Jul 1 2026 as the billing_cycle_anchor date.
When we add this the subscription are skipping the first invoice. The followup invoice is set to correct date but the first invoice is not created.
@glad solstice We have our specific use cases. Mainly we focus on creating subscription by the business from our provider portal to stripe. Business will create and manage subscriptions with us. The specific scenario we facing is backdated annually. The monthly backdated feature is working fine because we have phases of iterations in monthly. But in annual we have the single phase when the business create backdated subscriptions for an example today is Sep 17 business create a subscription that starts on Sep 18 2024. Then we have to raise an invoice today for creation of subscription and then the stripe next invoice should be set up to Sep 18 2025 which is tomorrow the second invoice should be created tomorrow and processed. When we add the billing_cycle_anchor the invoice needs to be generated today is skipped.
thanks for the clarification, looking into this
Hey! Taking over for my colleague. Let me catch up.
Just to make sure I fully understand the case, why you do create the subscription today and then backdate it? why not creating it directly backdated ?
Also have you had the chance to check this ?
https://docs.stripe.com/billing/subscriptions/backdating
Yup we are doing it directly. While creation of the subscription the business can select three types of time period [ backdated , current, future ]. If it is backdated we does exactly the same but we won't add the billing_cycle_anchor. We will only add the billing_cycle_anchor when we need the subscription but no need to create invoice for current period only the renewal invoice will be paid in that scenario.
customer: '{{CUSTOMER_ID}}',
backdate_start_date: 1575176400,
billing_cycle_anchor: 1572580800,
items: [
{
price: '{{PRICE_ID}}',
},
],
});```
so when we omit the billing_cycle_anchor then the stripe automatically decides the creation date + 1 year as the next billing date. If we add the billing_cycle_anchor the subscription starts at July 1 2025 and the next billing is added on the July 1 2026 it works, but the invoice for the period of creation Sep 17 2025 is not been there.
but the invoice for the period of creation Sep 17 2025 is not been there.
Sorry I'm not sure I understand this part
Can you share a sample Subscription Id created and what are you expecting exactly to happen ?
Hoo my bad. Here is the sample subcription ID - sub_1S8DtMIvwrjYDHRMAS3uoXGO.
sub_1S8DtMIvwrjYDHRMAS3uoXGO
This subscription is created on today Sep 17 2025, backdated to Jul 1 2025. I have setted up the billing anchor to Jul 1 2026 on the time subscription creation. In the subscription you can see the next billing date is pointed correctly to Jul 1 2026 but in the invoice section there is no invoice generated for current period which is Jul 1 2025 to Jul 1 2026.
We expected two invoice one should generate immediately on the subcription creation which covers the period of Jul 1 2025 to Jul 1 2026 and the second invoice should raise on Jul 1 2026 for the period of Jul 1 2026 to Jul 1 2027
I hope now it is clear
Ok I see, thank you so much for the detailed answer. Let me double check further
Any reason why in your request you set proration behavior None ? because with that parm there won't be any invoice generated
Can you make a test by removing it ?
In our scenario we need to raise an invoice for full payment. In our business flow when we backdated the subscription which means the user has already consumed some benefits from the subscription in the periods of Jul 1 to sep 17. So the business will activate the subscription from Jul 1 to cover the feature. So we added the proration to be set to none to make the full payment invoice.
๐ taking over for my colleague.
yes this is one of the most confusing behavior in our proration process
so people think when using proration_behavior: 'none' while creating the subscription that no proration would happen on the first invoice and that the amount will be fully charged
but our interpretation is that you don't want us to calculate the proration which doesn't result in any pending invoice items to be invoiced
in other words, we won't generate the invoice in that case
Yes I can see the pending invoice items
would you mind sharing the ID of any of these?
sub_1S8DtMIvwrjYDHRMAS3uoXGO
Here is it
that's the subscription ID
but you said you've see pending invoice items
where did you see these?
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!