diff --git a/CRM/Stripe/Customer.php b/CRM/Stripe/Customer.php
index aa21e470dfc16122384249bd93b26c0670075f3b..806d1b39083f84a00cfcee83be3a9ddf9f17db6e 100644
--- a/CRM/Stripe/Customer.php
+++ b/CRM/Stripe/Customer.php
@@ -164,7 +164,7 @@ class CRM_Stripe_Customer {
    * @throws \CRM_Core_Exception
    * @throws \CiviCRM_API3_Exception
    */
-  private static function getStripeCustomerMetadata($params) {
+  public static function getStripeCustomerMetadata($params) {
     $contactDisplayName = Contact::get(FALSE)
       ->addSelect('display_name')
       ->addWhere('id', '=', $params['contact_id'])
@@ -181,7 +181,7 @@ class CRM_Stripe_Customer {
       'email' => $params['email'] ?? '',
       'metadata' => [
         'CiviCRM Contact ID' => $params['contact_id'],
-        'CiviCRM URL' => CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$params['contact_id']}", TRUE, NULL, TRUE, FALSE, TRUE),
+        'CiviCRM URL' => CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$params['contact_id']}", TRUE, NULL, FALSE, FALSE, TRUE),
         'CiviCRM Version' => CRM_Utils_System::version() . ' ' . $extVersion,
       ],
     ];
@@ -239,7 +239,7 @@ class CRM_Stripe_Customer {
 
     // Could be multiple customer_id's and/or stripe processors
     foreach ($customers as $customer) {
-      $stripe = new CRM_Core_Payment_Stripe(NULL, $customer['processor_id']);
+      $stripe = \Civi\Payment\System::singleton()->getById($customer['processor_id']);
       CRM_Stripe_Customer::updateMetadata(
         ['contact_id' => $contactId, 'processor_id' => $customer['processor_id']],
         $stripe,
diff --git a/CRM/Stripe/Upgrader.php b/CRM/Stripe/Upgrader.php
index 3120d457716cae4a01b1be81f0ad2de17d509378..d2f4178cf88ef1af3abe3312253dd0e61bdae544 100644
--- a/CRM/Stripe/Upgrader.php
+++ b/CRM/Stripe/Upgrader.php
@@ -422,7 +422,8 @@ class CRM_Stripe_Upgrader extends CRM_Stripe_Upgrader_Base {
   public function upgrade_6803() {
     $this->ctx->log->info('Applying Stripe update 5028. In civicrm_stripe_customers database table, rename id to customer_id, add new id column');
     if (!CRM_Core_BAO_SchemaHandler::checkIfFieldExists('civicrm_stripe_customers', 'customer_id')) {
-      CRM_Core_DAO::executeQuery("ALTER TABLE civicrm_stripe_customers RENAME COLUMN id TO customer_id");
+      // ALTER TABLE ... RENAME COLUMN only in MySQL8+
+      CRM_Core_DAO::executeQuery("ALTER TABLE civicrm_stripe_customers CHANGE COLUMN id customer_id varchar(255) COMMENT 'Stripe Customer ID'");
       if (CRM_Core_BAO_SchemaHandler::checkIfIndexExists('civicrm_stripe_customers', 'id')) {
         CRM_Core_DAO::executeQuery("ALTER TABLE civicrm_stripe_customers RENAME INDEX id TO customer_id");
       }
diff --git a/api/v3/StripeCustomer.php b/api/v3/StripeCustomer.php
index 18c8c71c91194b2610f2518055c28a07b7e215c0..e1fe97ac834c9437e9df5691d40645c8baa92d06 100644
--- a/api/v3/StripeCustomer.php
+++ b/api/v3/StripeCustomer.php
@@ -135,50 +135,51 @@ function civicrm_api3_stripe_customer_updatestripemetadata($params) {
   if (!isset($params['dryrun'])) {
     throw new CiviCRM_API3_Exception('Missing required parameter dryrun');
   }
-  // Check params
-  if (empty($params['id'])) {
+  $customers = \Civi\Api4\StripeCustomer::get();
+  if (isset($params['options']['limit'])) {
+    $customers = $customers->setLimit($params['options']['limit']);
+  }
+  if (isset($params['options']['offset'])) {
+    $customers = $customers->setOffset($params['options']['offset']);
+  }
+
+  if ($params['customer_id']) {
+    $customers = $customers->addWhere('customer_id', '=', $params['customer_id']);
+  }
+  else {
     // We're doing an update on all stripe customers
     if (!isset($params['processor_id'])) {
       throw new CiviCRM_API3_Exception('Missing required parameters processor_id when using without a customer id');
     }
-    $customerIds = CRM_Stripe_Customer::getAll($params['processor_id'], $params['options']);
-  }
-  else {
-    $customerIds = [$params['id']];
+    else {
+      $customers = $customers->addWhere('processor_id', '=', $params['processor_id']);
+    }
   }
-  foreach ($customerIds as $customerId) {
-    $customerParams = CRM_Stripe_Customer::getParamsForCustomerId($customerId);
-    if (empty($customerParams['contact_id'])) {
-      throw new CiviCRM_API3_Exception('Could not find contact ID for stripe customer: ' . $customerId);
+
+  $customers = $customers->execute();
+
+  foreach ($customers as $customer) {
+    if (!$customer['contact_id']) {
+      throw new CiviCRM_API3_Exception('Could not find contact ID for stripe customer: ' . $customer['customer_id']);
     }
 
     /** @var \CRM_Core_Payment_Stripe $paymentProcessor */
-    $paymentProcessor = \Civi\Payment\System::singleton()->getById($customerParams['processor_id']);
+    $paymentProcessor = \Civi\Payment\System::singleton()->getById($customer['processor_id']);
 
     // Get the stripe customer from stripe
     try {
-      $paymentProcessor->stripeClient->customers->retrieve($customerId);
+      $paymentProcessor->stripeClient->customers->retrieve($customer['customer_id']);
     }
     catch (Exception $e) {
       $err = CRM_Core_Payment_Stripe::parseStripeException('retrieve_customer', $e);
       throw new PaymentProcessorException('Failed to retrieve Stripe Customer: ' . $err['code']);
     }
 
-    // Get the contact display name
-    $contactDisplayName = civicrm_api3('Contact', 'getvalue', [
-      'return' => 'display_name',
-      'id' => $customerParams['contact_id'],
-    ]);
-
-    // Currently we set the description and metadata
-    $stripeCustomerParams = [
-      'description' => $contactDisplayName . ' (CiviCRM)',
-      'metadata' => ['civicrm_contact_id' => $customerParams['contact_id']],
-    ];
+    $stripeCustomerParams = CRM_Stripe_Customer::getStripeCustomerMetadata($customer);
 
     // Update the stripe customer object at stripe
     if (!$params['dryrun']) {
-      $paymentProcessor->stripeClient->customers->update($customerId, $stripeCustomerParams);
+      $paymentProcessor->stripeClient->customers->update($customer['customer_id'], $stripeCustomerParams);
       $results[] = $stripeCustomerParams;
     }
     else {