#tee-invoice-limitation

1 messages · Page 1 of 1 (latest)

potent tartanBOT
sly tulip
#

in_1NfPPcKjI0M1O6BOQkVgaRgi is the invoice

quasi stone
#

You can delete/modify Invoices associated with a Subscription that's canceled, that's a limitation of our API

#

tee-invoice-limitation

sly tulip
#

okay so going back to the original issue, any other ways to get around this problem where even though i specify to cancel the subscription at the trial end, not create_invoice, I have a draft invoice which i now can't delete/void?

#

the only other option I have is remove the billing_cycle_anchor which seems to be causing the issue in the first place, but then if someones on a trial and wants to continue, attaches a payment method, I can't prorate their first invoice to the 1st of the next month without setting the billing_cycle_anchor

quasi stone
#

I'm sorry I'm not sure how to help without a clearer overall summary. You can't delete Invoices from a Subscription but you can void them. You can void that Invoice before the Subscription cancel for example

sly tulip
#

Okay so from the beginning. I want to create a trial subscription which also has a billing cycle anchor tied to the 1st of the next month. The problem I'm running into is that when you provide both https://stripe.com/docs/api/subscriptions/create#create_subscription-billing_cycle_anchor and https://stripe.com/docs/api/subscriptions/create#create_subscription-trial_settings-end_behavior-missing_payment_method, even if i provided cancel as the end behaviour and not create_invoice, it STILL created an invoice. I tested earlier that removing the billing_cycle_anchor in the trial creation does not create the invoice as expected, but providing it should also have the same expected behaviour, but that seems like a bug as mentioned in this thread #dev-help message.

#

Im trying to work around that by deleting the invoice as soon as its created since I'm listening to the customer.subscription.deleted, and was trying to check some fields to ensure it was a trial end which caused the deletion to then modify the invoice generated

sly tulip
quasi stone
#

@sly tulip really sorry, Discord got really busy and I missed your reply my bad. I'm looking but will take some additional time

#

@sly tulip do you have maybe an end to end script to trigger this? It's really hard to grasp with TestClocks without seeing exactly what you're doing to each object one by one

#

Like your billing cycle was December 1st but the TestClock is on December 9 well after that Invoice

sly tulip
#

I can give you some samples of requests?

quasi stone
#

that won't really help I can see the requests it's just really hard to make sense of them and piece what you're trying to do when also advancing time way past the billing_cycle_anchor

sly tulip
#

Okay check now, the latest subscription is a trial ending on dec 22, created by req req_xJ0nH3OGsC08KR

#

the test clock is dec 8, i will move it to dec 23

quasi stone
#

what am I supposed to check?

#

Why Dec 23?

sly tulip
#

its after the trial expires

quasi stone
#

Like if you move anywhere more than one hour after the period it's too late for you to do anything with that Invoice

sly tulip
#

and its set to cancel, without creating an invoice

quasi stone
#

Is that what you're misunderstanding?

#

Like advance to 1 second after the end of the trial

sly tulip
#

the trial end is 1703311199 and the TC is now at 1703311200

#

its now at 1703311200 and the trial is expired, with a new draft invoice

#

why the invoice is generated when i specified cancel in req_xJ0nH3OGsC08KR is the original issue

#

but now that the invoice is there, i can't delete it either, req_XwirS4KuBoPXRO is the attempt

potent tartanBOT
misty dirge
#

Hi there 👋 taking over, as my colleague needs to step away

Give me a few minutes to get caught up.

sly tulip
#

no worries

quasi stone
#

@sly tulip I have explained you can not delete Invoices for Subscriptions earlier

#

@sly tulip okay I spoke to my team

#

it seems you talked to other people on my team and they explained this is a real API bug.

#

So for now there's nothing you can do. The next step is to write in to our support team, explained you spoke to us and there's a real API bug and you are asking for help getting it fixed. You can contact them here: https://support.stripe.com/contact

sly tulip
#

correct, i understand that. Im trying to figure out how to get rid of those invoices since they shouldn't be created in the first place. One member mentioned to void them, #1141022242520707234 message, but that workaround isn't viable

quasi stone
#

That's impossible

#

So yeah that person misunderstood, right now there's nothing you can do but ignore those Invoices

sly tulip
#

okay no worries, i'll figure out something in the interim to not include those invoices since they're tied to a cancelled subscription

quasi stone
#

yeah I'm sorry it's been a long running issue where you can't do anything with those Invoices. But for your case the real solution is that the Invoice shouldn't even happen in this case

#

It's unlikely we'll fix this soon though based on the history of this behaviour but reporting it to our support team at https://support.stripe.com/contact is the best next step