#santhosh_api

1 messages ยท Page 1 of 1 (latest)

tough notchBOT
#

๐Ÿ‘‹ 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.

glad solstice
#

hi there!

dire oxide
#

Hi

#

Hello @glad solstice

glad solstice
#

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?

dire oxide
#

Yes

glad solstice
dire oxide
#

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.

glad solstice
#

thanks for the clarification, looking into this

atomic arch
#

Hey! Taking over for my colleague. Let me catch up.

dire oxide
#

Yup sure @atomic arch

#

Can you figure out any approach to handle that scenario?.

atomic arch
#

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 ?

dire oxide
#

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.
atomic arch
#

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 ?

dire oxide
#

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

atomic arch
#

Ok I see, thank you so much for the detailed answer. Let me double check further

tough notchBOT
atomic arch
#

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 ?

dire oxide
#

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.

lime surge
#

๐Ÿ‘‹ 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

dire oxide
#

Yes I can see the pending invoice items

lime surge
#

would you mind sharing the ID of any of these?

dire oxide
#

sub_1S8DtMIvwrjYDHRMAS3uoXGO

Here is it

lime surge
#

that's the subscription ID

#

but you said you've see pending invoice items

#

where did you see these?

tough notchBOT
rugged tendon
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

dire oxide
#

Give me sometime I will Update the invoice here

#

Yup Hi @rugged tendon