#eoghanobrien

1 messages · Page 1 of 1 (latest)

ivory karmaBOT
lusty shell
leaden moon
#

In the customer overview it shows 2 invoices, here's the most recent one: in_1Mz5XWE3c9sWyeruAHtBKEqN

lusty shell
#

Invoice and Invoice Items are two separate objects

leaden moon
#

I think what happened here is I updated the subscription/created the invoice from my development machine without having the stripe cli listener running locally, so the webhook went to our staging environment

#

Does that sound like it could have caused this?

lusty shell
leaden moon
#

req_iogmuzuiGbIl4J

#

No that's not it ☝️ (the request id is fine) it looks like we weren't using immediate invoicing before, so we would update the subscription then create an invoice using just the customer ID - my assumption is that would then create the invoice for a prorated draft invoice or something?

lusty shell
#

Can you share the correct request id with me? Without it, it's really hard to understand what the question is

leaden moon
#

The one above is the correct id, were you not able to get it?

#

req_iogmuzuiGbIl4J

lusty shell
#

I saw your 'No that's not it' so did not look further..

#

Looking now

#

What do you think would trigger this protate, 'my assumption is that would then create the invoice for a prorated draft invoice'?

leaden moon
#

I think this is a legacy code issue on our side

#

We use an eventing system with listeners and it looks like that specific listener wasn't disabled.

lusty shell
#

I see

leaden moon
#

I'm running a separate test now to confirm

#

Based on what you said, it sounds like my assumption is correct

#

We were expecting the pending invoice to exist because we were using the old subscription.prorate = true functionality instead of the new subscription.proration_behavior

lusty shell
#

Are you making a call to update a subscription?

leaden moon
#

Yes ... We switched to the newer proration_behavior and the invoiced processed and paid as expected but we still called the Invoice::create([customer_id: customerID]) afterward but there was no pending invoice at that point