#gus_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1431098358352576664
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there, will be here soon
Thanks, no rush!
Hey sorry was in some internal MTG...
Would passing an empty "default_tax_rates" when updating a subscription price would get rid of this error
I think this should, but the tricky part is that you can't even repro in Test mode or Sandbox, correct?
Well yeah I created a plan with "unspecified" as I pointed out and then tried to update it to one that is "inclusive" and the operation went through, this on testing
Okie can you share that request id as well?
Sorry I had to go, I'm back...
The request for that test I did is "req_XKtTLaLvtbCfm7"... bear in mind that this is on a completely different account that we use for testing
but I did created the plans manually to reflect those we have in production
I see. The plan sept22_base_plan_49 , which Product is it belonged to?
in production?
Yes. Do you have the Product Id?
That one has tax_behavior = inclusive, right?
One of the plans/prices that we have, which is somewhat old, has an "unspecified" tax behavior
Andprice_0HXutdr8I8VvZ3QJn4mTBiTcis the existing Price on the Subscription Item, which has unspecified tax behavior
Okie I get this. Now looking at the Test mode reproduction req_XKtTLaLvtbCfm7
New adding price is price_1SLZdiJt5n54xbldJ5gez7S8 which is an inclusive tax behavior
Existing Subscription Item had price_1SLZYZJt5n54xbldqikcMuZz which is an unspecified tax behavior
Hmm I see
yes, the production one price has tax_behavior inclusive
And yes, in the other test account like you said price_1SLZYZJt5n54xbldqikcMuZz has unspecified tax behavior, whereas the other price price_1SLZdiJt5n54xbldJ5gez7S8 has inclusive, here's the interesting part, in test, if I go to the dashboard, the price that doesn't have a tax behavior specified shows up like this
However, when pulling the price from the API it says unspecified:
{
:id => "price_1SLZYZJt5n54xbldqikcMuZz",
:object => "price",
:active => true,
:billing_scheme => "per_unit",
:created => 1761268359,
:currency => "usd",
:custom_unit_amount => nil,
:livemode => false,
:lookup_key => nil,
:metadata => {},
:nickname => "Birch 64",
:product => "prod_THip7cRxWIk5Hi",
:recurring => {
:interval => "month",
:interval_count => 1,
:meter => nil,
:trial_period_days => nil,
:usage_type => "licensed"
},
:tax_behavior => "unspecified",
:tiers_mode => nil,
:transform_quantity => nil,
:type => "recurring",
:unit_amount => 6400,
:unit_amount_decimal => "6400"
}
Which is interesting because in the Dashboard, for the production price that also has an unspecified tax behavior it does show up like that saying unspecified whereas in the test it sets it to default
Yep the live mode price_0HXutdr8I8VvZ3QJn4mTBiTc was created a long time ago, and test mode price_1SLZYZJt5n54xbldqikcMuZz may be replicate exactly its behavior
Sorry we will be back in 15 min-ish. Let us look closer a bit
I also notice the Live mode Subscription has a tax rate, but the Test mode doesn't
Sure, take your time, this is not a critical issue for us, we just have to manually downgrade/upgrade certain clients where we have had this behavior happen (for those old prices)
So the first error is not really related to the unspecified price.
The Live mode Subscription currently has an exclusive tax rate txr_0CLEifr8I8VvZ3QJqG3C7tNh . It currently has the unspecified Price, and you are trying to Update it to have an inclusive new plan sept22_base_plan_49 (price_0LrisMr8I8VvZ3QJPVs0UlVW)
If you want to repro, you would want to create a Test Subscription with an exclusive tax rate first, then try the similar Update API
Ahhh gotcha, let me try that
Alright I was able to finally replicate it in the testing mode and yes, sending default_tax_rates does solve the problem, thank you so much for your help you guys rock!
Hi @jade rover I'm glad to hear that you solved the problem! If you have any other questions. Feel free to reach out again!