#dannyboi_unexpected

1 messages ยท Page 1 of 1 (latest)

lunar emberBOT
#

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

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

azure void
#

Hi ๐Ÿ‘‹

I'm taking a look.

azure void
#

Oh, the InvoiceItems you referenced were created after the latest invoice was generated

#

They will be picked up on the next Invoice

#

The request you shared was sent at 2024-10-11 15:38:51 UTC

#

But the latest Invoice was created at 2024-10-11 14:56:47 UTC

queen quest
#

Is the "Upcoming invoice" view in the dashboard and the response from Invoice.upcoming() showing the next invoice, the one that we'd expect to pick up these invoice items?

azure void
#

That is what I would expect, yes

queen quest
#

But that's not what we're seeing right? A colleague of mine modified the subscription recently which triggered a new invoice so I just made a new invoice item with request id req_ysGKWiBWa51Smj and it's not showing up on the upcoming invoice

azure void
#

Hmm okay let me run a test scenario to see if I can replicate this behavior

queen quest
#

Thank you!

lunar emberBOT
azure void
#

Hmmm... I am seeing the behavior I expect. I created a Subscription and then created two new Invoice items. When I get the upcoming invoice, I see all 3 invoice items

queen quest
#

Hmmm weird thanks for running a test scenario. Just to confirm, on your end are you able to see what I'm seeing that for my subscription the invoice items aren't being added?

azure void
#

No, in my scenario I

  • Create a customer & subscription with a single Subscription Item - at this point the first invoice is already created & paid
  • Create 2 new Invoice Item objects, specifying the Customer and Subscription IDs from the first step
  • Use the create_preview API (https://docs.stripe.com/api/invoices/create_preview) to retrieve the next Invoice

I see all 3 invoice items for the upcoming invoice

austere ridge
#

๐Ÿ‘‹ Stepping in for my teammate

#

I think you may already be discussing this issue over email with another teammate of ours. I was just testing with them as well and we could not reproduce the behavior you see. That said, the way we were testing was via Test Clocks and the API.

#

I see you were also editing Subscriptions via the Dashboard simultaneously, which was also resulting in Invoices being cut outside of the typical cycles

queen quest
#

To make things cleaner I just made a new subscription, created an invoice item, and am still not seeing it on the upcoming invoice

#

The request id is req_zBaLyzva7U53cH

#

And just to check, are you able to look at my stripe dashboard and/or make requests with the customer id and subscription id from that invoice item request?

austere ridge
#

I can't make requests on your behalf but can look at your logs

queen quest
#

Is there more information I can provide to help debug this? I'm able to see the invoice item is not showing up both in the Stripe dashboard in the Upcoming Invoice section on the associated subscription's page and in the response from Invoice.upcoming

austere ridge
#

Give me a few minutes to review these logs

queen quest
#

Thank you. I just made request req_fjgKLDouC9ngeO to get the upcoming invoice to hopefully show that the invoice item is not there

austere ridge
#

I can't see the results of GET requests on my end unfortunately

#

Doing some more testing that more closely aligns with the conditions you're using (a $0 price to begin with)

#

Hm, okay, we still can't reproduce what you see

#

We're going to continue investigating on our end and keep you updated over email. Thanks for the latest example!

queen quest
#

I figured it out! I wasn't specifying a tax behavior when creatiing the invoice item. When I specify "tax_behavior": "exclusive" it works

#

Thank you so much for your support with this issue

austere ridge
#

Ooh!

#

Ah, I see what you mean. We were testing with prices that both had unspecified tax behavior

#

I see your most recent example used a price with exclusive and the price for the invoice item you created defaulted to unspecified

austere ridge