#Codex - tax behavior

1 messages ยท Page 1 of 1 (latest)

twin remnant
#

Hello, thanks for the info. I will check in to that info shortly

#

The server is pretty busy at the moment so it may be a few minutes

frail rose
#

Thank you

twin remnant
#

Apologies it took me a while. Back and looking in to this

frail rose
#

Thanks

twin remnant
#

Have you been able to get this code to work with other prices?

frail rose
#

Yes, that is the only one

#

And tax behavior is correctly set for that price. I am not sure why it's giving that error on stripe.Invoice.upcoming

twin remnant
#

Would you be able to send me the request ID from a time that this worked?

#

Yeah set up properly as far as I can see but still looking

frail rose
#

It was when we enabled Stripe Tax, that this error showed up. Previously we used a different 3rd party tax calculator

twin remnant
#

Gotcha, but even with Stripe Tax enabled it sounds like the other prices work, right?

frail rose
#

Correct

#

That is the only price that is showing up for some reason

#

Even though our older prices (that are also archived) can still preview a proration with a new price

twin remnant
#

Can you send me a request ID req_123 from a time that this worked with your newer prices?

#

It will be helpful to compare

frail rose
#

Alright, let me check for ONE

#

Here is one: req_9SdQYBmztKYkAT

#

Where it worked

twin remnant
#

Thank you!

frail rose
#

Sorry, that one was a tax estimation. This one is a proration preview example: req_jmtabLHOD6h1DB

twin remnant
#

Even better, I actually have to step out at the moment but my colleague @livid flare is taking over looking in to this for you

frail rose
#

Thank you

livid flare
#

Okay so the error you received earlier stated that you were trying to use a Price object that did not have a specified tax_behavior. This price object is active and has a specified tax_behavior: exclusive. What about this and your earlier requests are behaving in an unexpected manner?

frail rose
#

Yes exactly. The customer is on an old archived product/plan with tax_behavior: exclusive already set, trying to upgrade their product/plan also with tax_behavior: exclusive set

#

But for some reason, it is giving an invalid request error, saying that tax_behavior is not set, when it is

#

But this is only erroring for one product/plan when previewing prorations. We have other legacy products/plans that are archived that pass without errors

livid flare
#

Oh okay. I think you need to the swap the prices in the Subscription before you enable automatic tax.

frail rose
#

Hmm but this is working for our other ones

#

Where we just preview the upgrade

#

This is the only price that is erroring

#

Using stripe.Invoice.upcoming with a new plan, with automatic_tax: enabled to preview the new cost and taxes

livid flare
#

I am saying that the issue may be that the previous price may not have had a tax_behavior set on that subscription. In that case the API tries to apply the automatic tax first and hits that error.

frail rose
#

Yes the previous price's product has the tax_behavior set to exclusive, which is why we don't understand why this is happening

livid flare
#

๐Ÿค”

frail rose
#

And our other tiers of previous plans/products also have automatic_tax: enabled to be upgraded from, but only 1 plan of a product is showing this error

livid flare
#

Okay I looked into that Subscription and the current price has tax_behavior: unspecified. i think that is what is causing the problem

frail rose
#

Where is that?

#

This is the old product that the Subscription is currenly on

#

Do you have a link to that current price where it is tax_behavior: unspecified? Is it something hidden that I can just turn to exclusive?

livid flare
#

I'm looking at this price: pl_6eJDCGtRI2Uq2u for the product pr_0B7FMOuagHrUveG4q9eqfmTr

frail rose
#

This price pl_6eJDCGtRI2Uq2u is not showing

#

Like when I search it up

livid flare
#

It is not active

#

in fact deleted: true

frail rose
#

How can I see this?

livid flare
#

So that is likely also causing an issue. You cannot update this record because you no longer have access to it

#

You can't

frail rose
livid flare
#

It only exists on my end because it is still associated with a Subscription

frail rose
#

Oh, maybe a bunch of our old Yearly subscriptions are on that deleted price

#

Is there a way we can recover that, and also make it tax_behavior: unspecified

livid flare
#

Unfortunately I do not know of a way to restore access to the deleted price.

frail rose
#

So this error will continue and upgrades are blocked?. We can't do anything about it?

#

When I press that Subscriptions' product and price, they exist...

livid flare
#

You would first set the Price to one with a specified tax_behavior and then enable automatic tax

frail rose
#

Ahh so force upgrade them with stripe.Subscription.modify, and not do a preview with stripe.Invoice.upcoming

#

?

#

But not sure why this product and price exist

livid flare
#

You deleted a Price while it still was associated with Subscription records. Generally we recommend only making prices inactive for reasons like this

frail rose
#

If someone did that, it is most likely accidental

#

So the current plan and price that shows up is something else? The one that appears on my end

livid flare
#

Apparently. You are using custom merchant IDs and that can also make it difficult to be specific about the records being reviewed.

frail rose
#

AHh I see

#

So there is no way we can fix this other than force upgrade their subscription?

livid flare
#

I suspect so. That will return the subscription to a state where you can preview different price and tax behaviors.

frail rose
#

I see, thank you. So there is no way a Stripe developer can update the deleted price to tax_behavior: exclusive?

#

And is there a way this convo can be sent to an email?

livid flare
#
  1. unfortunately not
  2. unfortunately not
frail rose
#

Alright, thank you for the coordination and help

#

๐Ÿ™