#ely-landruz_unexpected

1 messages ยท Page 1 of 1 (latest)

hard furnaceBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

strong forge
#

As you can see the invoice do not wait for 7 days to be created, and then the payment was not valid and that cause that the status of the subscription is not "active"

thick dockBOT
north wadi
#

Hi there ๐Ÿ‘‹ can you paste the ID of the Invoice you're referring to here? I'm not sure I'm grasping what you're describing and need to take a closer look.

strong forge
#

in_1PnisqH8QBEtWGoJyMlkrKDT this is the invoice id

north wadi
#

That's an Invoice created by a Subscription cycling to a new billing period. There isn't an option to delay the creation of those Invoices, they're always created when the new billing period is started.

Can you elaborate on where you think you configured a 7-day delay for those to ensure I'm not overlooking something?

strong forge
#

Yes but when they create a new billing period was for 7 days, and its not the first time she do it, and works good, but in this case do not do it

north wadi
#

Do you have more context on what that means? What requests you made for that? Examples of where it worked differently in the past?

strong forge
#

For example here is another invoice id where the client do it and all good in_1PenChH8QBEtWGoJRa4eYgKn

north wadi
#

I can't read the text written there, so I don't know what you're trying to convey from that screenshot. That Invoice was created as soon as the Subscription changed billing periods, so it seems to have behaved the same as the previous one and I'm not grasping what you're describing.

strong forge
#

The invoice should wait for 7 days, and instead of that was created inmediately

#

here is another invoice id in_1PenChH8QBEtWGoJRa4eYgKn

#

that works as expected

north wadi
#

Which was created as soon as the Subscription changed billing periods.

#

This is the invoice.created Event emitted when the Invoice was created:
evt_1PenCiH8QBEtWGoJIZyHN9RV
This is the customer.subscription.updated Event that was generated when the Subscription updated because it moved to the new billing period:
evt_1PenCiH8QBEtWGoJAm4RcbKZ

Their timestamps are one second apart, not 7 days.

strong forge
#

I think I dont explain me well

#

But basically the new cycle need to be on 7 days

#

not the same day

north wadi
#

I think what you're referring to is the generation of invoice.upcoming Events.

And if you set a billing period of 7 days it makes sense for those two Events to be fired simultaneously. invoice.created when the new Invoice is generated because the billing period cycled, and the invoice.upcoming because a 7-day billing period means the next Invoice will be generated in 7 days.

hard furnaceBOT
strong forge
#

Yes, in a previos case the invoice.upcoming was set for 7 days, and the invoice.created wait for that 7 days

#

But what i am referring is that in the las time the invoice.upcoming was set for 7 days and the invoice.created was created inmediately

north wadi
strong forge
#

Yes!

north wadi
#

invoice.upcoming does not impact invoice.created in any way

#

They are two distinct event types.

strong forge
#

Can you tell me please, what you need? For example a SS

#

or an id?

north wadi
#

I need to know what Events you think were generated incorrectly.

#

IDs are preferrable

strong forge
#

this is the invoice.upcoming evt_1PnUh6H8QBEtWGoJ4FOH7L3o

#

and this is the invoice.created evt_1PnisrH8QBEtWGoJcrJltfXe

quasi belfry
#

Before the Subscription was updated by you, your billing cycle was anchored at the 21st of each month, so it makes sense that you would get an invoice.upcoming event. Adjusting the trial caused the billing cycle anchor to get changed to the 31st

strong forge
#

Yes but the invoice.created didnt have to wait for 7 days? Instead of do it inmediately?

quasi belfry
#

It did do it immediately. Right after you made that request, the Invoice was created

strong forge
#

Yes but the request was to be done within 7 days

quasi belfry
#

What?

#

I don't understand what you mean

strong forge
#

i mean the request made was that the invoice was created in a lapse of 7 days

quasi belfry
#

Here's what happened:

  1. you had a subscription that was set to renew on the 21st
  2. on 2024-08-14 00:04:03 UTC that subscription created an invoice.upcoming Event (7 days before the renewal)
  3. on 2024-08-14 15:13:08 UTC you sent us this request (https://dashboard.stripe.com/logs/req_YrItviXxGbVivV) which changed the billing cycle to the 31st of August and also generated a new $0 invoice immediately. That's what happens when you create a trial on an existing subscription.
  4. You'll get another invoice.upcoming event on August 26th, since the Subscription now renews on the 31st
strong forge
#

That make sense, I will check it thanks!!!