diff --git a/src/Core/Services/Implementations/StripePaymentService.cs b/src/Core/Services/Implementations/StripePaymentService.cs index d435d74642..b088b0ecd9 100644 --- a/src/Core/Services/Implementations/StripePaymentService.cs +++ b/src/Core/Services/Implementations/StripePaymentService.cs @@ -444,20 +444,24 @@ namespace Bit.Core.Services Quantity = 1, }); - var taxRates = await _taxRateRepository.GetByLocationAsync( - new Bit.Core.Models.Table.TaxRate() - { - Country = customer.Address.Country, - PostalCode = customer.Address.PostalCode - } - ); - var taxRate = taxRates.FirstOrDefault(); - if (taxRate != null) + if (!string.IsNullOrWhiteSpace(taxInfo?.BillingAddressCountry) + && !string.IsNullOrWhiteSpace(taxInfo?.BillingAddressPostalCode)) { - subCreateOptions.DefaultTaxRates = new List(1) - { - taxRate.Id - }; + var taxRates = await _taxRateRepository.GetByLocationAsync( + new Bit.Core.Models.Table.TaxRate() + { + Country = taxInfo.BillingAddressCountry, + PostalCode = taxInfo.BillingAddressPostalCode + } + ); + var taxRate = taxRates.FirstOrDefault(); + if (taxRate != null) + { + subCreateOptions.DefaultTaxRates = new List(1) + { + taxRate.Id + }; + } } if (additionalStorageGb > 0)