diff --git a/src/Core/Billing/Services/Implementations/SubscriberService.cs b/src/Core/Billing/Services/Implementations/SubscriberService.cs index 401d9ce2c..b0d290a55 100644 --- a/src/Core/Billing/Services/Implementations/SubscriberService.cs +++ b/src/Core/Billing/Services/Implementations/SubscriberService.cs @@ -768,8 +768,9 @@ public class SubscriberService( { var metadata = customer.Metadata ?? new Dictionary(); - if (metadata.ContainsKey(BraintreeCustomerIdKey)) + if (metadata.TryGetValue(BraintreeCustomerIdKey, out var value)) { + metadata[BraintreeCustomerIdOldKey] = value; metadata[BraintreeCustomerIdKey] = null; await stripeAdapter.CustomerUpdateAsync(customer.Id, new CustomerUpdateOptions