1
0
mirror of https://github.com/bitwarden/server synced 2025-12-22 19:23:45 +00:00

[PM-25205] Don't respond with a tax ID warning for US customers (#6310)

* Don't respond with a Tax ID warning for US customers

* Only show provider tax ID warning for non-US based providers
This commit is contained in:
Alex Morask
2025-09-19 10:26:22 -05:00
committed by GitHub
parent d2c2ae5b4d
commit 14b307c15b
4 changed files with 496 additions and 38 deletions

View File

@@ -15,6 +15,7 @@ using Stripe.Tax;
namespace Bit.Core.Billing.Organizations.Queries;
using static Core.Constants;
using static StripeConstants;
using FreeTrialWarning = OrganizationWarnings.FreeTrialWarning;
using InactiveSubscriptionWarning = OrganizationWarnings.InactiveSubscriptionWarning;
@@ -232,6 +233,11 @@ public class GetOrganizationWarningsQuery(
Customer customer,
Provider? provider)
{
if (customer.Address?.Country == CountryAbbreviations.UnitedStates)
{
return null;
}
var productTier = organization.PlanType.GetProductTier();
// Only business tier customers can have tax IDs