#Codex - tax behavior
1 messages ยท Page 1 of 1 (latest)
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
Thank you
Apologies it took me a while. Back and looking in to this
Thanks
Have you been able to get this code to work with other prices?
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
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
It was when we enabled Stripe Tax, that this error showed up. Previously we used a different 3rd party tax calculator
Gotcha, but even with Stripe Tax enabled it sounds like the other prices work, right?
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
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
Thank you!
Sorry, that one was a tax estimation. This one is a proration preview example: req_jmtabLHOD6h1DB
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
Thank you
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?
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
Oh okay. I think you need to the swap the prices in the Subscription before you enable automatic tax.
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
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.
Yes the previous price's product has the tax_behavior set to exclusive, which is why we don't understand why this is happening
๐ค
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
Okay I looked into that Subscription and the current price has tax_behavior: unspecified. i think that is what is causing the problem
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?
I'm looking at this price: pl_6eJDCGtRI2Uq2u for the product pr_0B7FMOuagHrUveG4q9eqfmTr
How can I see this?
So that is likely also causing an issue. You cannot update this record because you no longer have access to it
You can't
It only exists on my end because it is still associated with a Subscription
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
Unfortunately I do not know of a way to restore access to the deleted price.
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...
You would first set the Price to one with a specified tax_behavior and then enable automatic tax
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
You deleted a Price while it still was associated with Subscription records. Generally we recommend only making prices inactive for reasons like this
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
Apparently. You are using custom merchant IDs and that can also make it difficult to be specific about the records being reviewed.
AHh I see
So there is no way we can fix this other than force upgrade their subscription?
I suspect so. That will return the subscription to a state where you can preview different price and tax behaviors.
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?
- unfortunately not
- unfortunately not