{"record":{"id":"2ec69dec080462f9","repo":"bitwarden/server","slug":"your-tax-id-wasn-t-recognized-for-your-selected-co","errorCode":null,"errorMessage":"Your tax ID wasn't recognized for your selected country. Please ensure your country and tax ID are valid.","messagePattern":"Your tax ID wasn't recognized for your selected country\\. Please ensure your country and tax ID are valid\\.","errorType":"exception","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"bitwarden_license/src/Commercial.Core/Billing/Providers/Services/ProviderBillingService.cs","lineNumber":593,"sourceCode":"                }\n        }\n\n        try\n        {\n            var customer = await stripeAdapter.CreateCustomerAsync(options);\n\n            if (!string.IsNullOrEmpty(setupIntentId))\n            {\n                await stripeAdapter.UpdateSetupIntentAsync(setupIntentId,\n                    new SetupIntentUpdateOptions { Customer = customer.Id });\n            }\n\n            return customer;\n        }\n        catch (StripeException stripeException) when (stripeException.StripeError?.Code == ErrorCodes.TaxIdInvalid)\n        {\n            await Revert();\n            throw new BadRequestException(\n                \"Your tax ID wasn't recognized for your selected country. Please ensure your country and tax ID are valid.\");\n        }\n        catch\n        {\n            await Revert();\n            throw;\n        }\n\n        async Task Revert()\n        {\n            // ReSharper disable once SwitchStatementMissingSomeEnumCasesNoDefault\n            switch (paymentMethod.Type)\n            {\n                case TokenizablePaymentMethodType.BankAccount when !string.IsNullOrEmpty(setupIntentId):\n                    {\n                        await stripeAdapter.CancelSetupIntentAsync(setupIntentId,\n                            new SetupIntentCancelOptions { CancellationReason = \"abandoned\" });\n                        break;","sourceCodeStart":575,"sourceCodeEnd":611,"githubUrl":"https://github.com/bitwarden/server/blob/e93b962371d80964556f5590c6615f5160a437a1/bitwarden_license/src/Commercial.Core/Billing/Providers/Services/ProviderBillingService.cs#L575-L611","documentation":"Error \"Your tax ID wasn't recognized for your selected country. Please ensure your country and tax ID are valid.\" thrown in bitwarden/server.","triggerScenarios":"Thrown when the submitted tax ID fails validation against the selected country during provider billing setup or update, typically because the tax ID format does not match the country's expected pattern or Stripe tax ID verification rejects it.","commonSituations":"See trigger scenarios.","solutions":["Verify the selected billing country matches the country the tax ID was issued in.","Re-enter the tax ID in the exact format expected for that country, including the country prefix (e.g. EU VAT numbers).","Confirm the tax ID is active using your country's official validation service, then resubmit.","If the ID is valid but still rejected, contact Bitwarden support to update the billing profile."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e93b962371d80964556f5590c6615f5160a437a1","analyzedAt":"2026-08-13T14:22:19.382Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}