diff --git a/composer.json b/composer.json
index 7c795cf..7b781cd 100755
--- a/composer.json
+++ b/composer.json
@@ -5,6 +5,6 @@
     "homepage": "http://drupal.org/project/commerce_stripe",
     "require": {
         "drupal/commerce": "^2.15",
-        "stripe/stripe-php": "^6.40"
+        "stripe/stripe-php": "^7.25"
     }
 }
diff --git a/src/ErrorHelper.php b/src/ErrorHelper.php
index 357fd43..d32aa4d 100755
--- a/src/ErrorHelper.php
+++ b/src/ErrorHelper.php
@@ -16,14 +16,14 @@ class ErrorHelper {
   /**
    * Translates Stripe exceptions into Commerce exceptions.
    *
-   * @param \Stripe\Error\Base $exception
+   * @param \Stripe\Exception\ApiErrorException $exception
    *   The Stripe exception.
    *
    * @throws \Drupal\commerce_payment\Exception\PaymentGatewayException
    *   The Commerce exception.
    */
-  public static function handleException(\Stripe\Error\Base $exception) {
-    if ($exception instanceof \Stripe\Error\Card) {
+  public static function handleException(\Stripe\Exception\ApiErrorException $exception) {
+    if ($exception instanceof \Stripe\Exception\CardException) {
       \Drupal::logger('commerce_stripe')->warning($exception->getMessage());
       if ($exception->getStripeCode() == 'card_declined' && $exception->getDeclineCode() == 'card_not_supported') {
         // Stripe only supports Visa/MasterCard/Amex for non-USD transactions.
@@ -36,23 +36,23 @@ class ErrorHelper {
         throw new DeclineException('We encountered an error processing your card details. Please verify your details and try again.');
       }
     }
-    elseif ($exception instanceof \Stripe\Error\RateLimit) {
+    elseif ($exception instanceof \Stripe\Exception\RateLimitException) {
       \Drupal::logger('commerce_stripe')->warning($exception->getMessage());
       throw new InvalidRequestException('Too many requests.');
     }
-    elseif ($exception instanceof \Stripe\Error\InvalidRequest) {
+    elseif ($exception instanceof \Stripe\Exception\InvalidRequestException) {
       \Drupal::logger('commerce_stripe')->warning($exception->getMessage());
       throw new InvalidRequestException('Invalid parameters were supplied to Stripe\'s API.');
     }
-    elseif ($exception instanceof \Stripe\Error\Authentication) {
+    elseif ($exception instanceof \Stripe\Exception\AuthenticationException) {
       \Drupal::logger('commerce_stripe')->warning($exception->getMessage());
       throw new AuthenticationException('Stripe authentication failed.');
     }
-    elseif ($exception instanceof \Stripe\Error\ApiConnection) {
+    elseif ($exception instanceof \Stripe\Exception\ApiConnectionException) {
       \Drupal::logger('commerce_stripe')->warning($exception->getMessage());
       throw new InvalidResponseException('Network communication with Stripe failed.');
     }
-    elseif ($exception instanceof \Stripe\Error\Base) {
+    elseif ($exception instanceof \Stripe\Exception\ApiErrorException) {
       \Drupal::logger('commerce_stripe')->warning($exception->getMessage());
       throw new InvalidResponseException('There was an error with Stripe request.');
     }
@@ -75,7 +75,7 @@ class ErrorHelper {
    *   The Commerce exception.
    */
   public static function handleErrors($result) {
-    $result_data = $result->__toArray();
+    $result_data = $result->toArray();
     if ($result_data['status'] == 'succeeded') {
       return;
     }
diff --git a/src/EventSubscriber/OrderPaymentIntentSubscriber.php b/src/EventSubscriber/OrderPaymentIntentSubscriber.php
index 0bfc242..4d8d0e4 100644
--- a/src/EventSubscriber/OrderPaymentIntentSubscriber.php
+++ b/src/EventSubscriber/OrderPaymentIntentSubscriber.php
@@ -10,7 +10,7 @@ use Drupal\commerce_price\Price;
 use Drupal\commerce_stripe\Plugin\Commerce\PaymentGateway\StripeInterface;
 use Drupal\Core\DestructableInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
-use Stripe\Error\Base as StripeError;
+use Stripe\Exception\ApiErrorException as StripeError;
 use Stripe\PaymentIntent;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 
diff --git a/src/Plugin/Commerce/CheckoutPane/StripeReview.php b/src/Plugin/Commerce/CheckoutPane/StripeReview.php
index 6f43ca8..c1fd776 100644
--- a/src/Plugin/Commerce/CheckoutPane/StripeReview.php
+++ b/src/Plugin/Commerce/CheckoutPane/StripeReview.php
@@ -110,7 +110,7 @@ class StripeReview extends CheckoutPaneBase {
       try {
         $intent = \Stripe\PaymentIntent::retrieve($intent_id);
       }
-      catch (\Stripe\Error\Base $e) {
+      catch (\Stripe\Exception\ApiErrorException $e) {
         ErrorHelper::handleException($e);
       }
     }
diff --git a/src/Plugin/Commerce/PaymentGateway/Stripe.php b/src/Plugin/Commerce/PaymentGateway/Stripe.php
index 516378b..ba7af92 100755
--- a/src/Plugin/Commerce/PaymentGateway/Stripe.php
+++ b/src/Plugin/Commerce/PaymentGateway/Stripe.php
@@ -164,7 +164,7 @@ class Stripe extends OnsitePaymentGatewayBase implements StripeInterface {
             $form_state->setError($form['secret_key'], $this->t('The provided secret key is not for the selected mode (@mode).', ['@mode' => $values['mode']]));
           }
         }
-        catch (\Stripe\Error\Base $e) {
+        catch (\Stripe\Exception\ApiErrorException $e) {
           $form_state->setError($form['secret_key'], $this->t('Invalid secret key.'));
         }
       }
@@ -233,7 +233,7 @@ class Stripe extends OnsitePaymentGatewayBase implements StripeInterface {
 
       // Update the transaction data from additional information added through
       // the event.
-      $metadata = $intent->metadata->__toArray();
+      $metadata = $intent->metadata->toArray();
       $metadata += $event->getMetadata();
 
       \Stripe\PaymentIntent::update($intent->id, [
@@ -243,7 +243,7 @@ class Stripe extends OnsitePaymentGatewayBase implements StripeInterface {
       $order->unsetData('stripe_intent');
       $order->save();
     }
-    catch (\Stripe\Error\Base $e) {
+    catch (\Stripe\Exception\ApiErrorException $e) {
       ErrorHelper::handleException($e);
     }
   }
@@ -276,7 +276,7 @@ class Stripe extends OnsitePaymentGatewayBase implements StripeInterface {
         $charge->capture($transaction_data);
       }
     }
-    catch (\Stripe\Error\Base $e) {
+    catch (\Stripe\Exception\ApiErrorException $e) {
       ErrorHelper::handleException($e);
     }
 
@@ -318,7 +318,7 @@ class Stripe extends OnsitePaymentGatewayBase implements StripeInterface {
         ErrorHelper::handleErrors($release_refund);
       }
     }
-    catch (\Stripe\Error\Base $e) {
+    catch (\Stripe\Exception\ApiErrorException $e) {
       ErrorHelper::handleException($e);
     }
 
@@ -345,7 +345,7 @@ class Stripe extends OnsitePaymentGatewayBase implements StripeInterface {
       $refund = \Stripe\Refund::create($data, ['idempotency_key' => \Drupal::getContainer()->get('uuid')->generate()]);
       ErrorHelper::handleErrors($refund);
     }
-    catch (\Stripe\Error\Base $e) {
+    catch (\Stripe\Exception\ApiErrorException $e) {
       ErrorHelper::handleException($e);
     }
 
@@ -400,7 +400,7 @@ class Stripe extends OnsitePaymentGatewayBase implements StripeInterface {
         $remote_payment_method->detach();
       }
     }
-    catch (\Stripe\Error\Base $e) {
+    catch (\Stripe\Exception\ApiErrorException $e) {
       ErrorHelper::handleException($e);
     }
     $payment_method->delete();
@@ -437,7 +437,7 @@ class Stripe extends OnsitePaymentGatewayBase implements StripeInterface {
       $intent = \Stripe\PaymentIntent::create($intent_array);
       $order->setData('stripe_intent', $intent->id)->save();
     }
-    catch (\Stripe\Error\Base $e) {
+    catch (\Stripe\Exception\ApiErrorException $e) {
       ErrorHelper::handleException($e);
     }
     return $intent;
@@ -509,7 +509,7 @@ class Stripe extends OnsitePaymentGatewayBase implements StripeInterface {
         \Stripe\PaymentMethod::update($stripe_payment_method_id, ['billing_details' => $payment_method_data]);
       }
     }
-    catch (\Stripe\Error\Base $e) {
+    catch (\Stripe\Exception\ApiErrorException $e) {
       ErrorHelper::handleException($e);
     }
     return $stripe_payment_method->card;
diff --git a/tests/modules/commerce_stripe_test/src/EventSubscriber/DecoratedOrderPaymentIntentSubscriber.php b/tests/modules/commerce_stripe_test/src/EventSubscriber/DecoratedOrderPaymentIntentSubscriber.php
index 4078bc7..2142194 100644
--- a/tests/modules/commerce_stripe_test/src/EventSubscriber/DecoratedOrderPaymentIntentSubscriber.php
+++ b/tests/modules/commerce_stripe_test/src/EventSubscriber/DecoratedOrderPaymentIntentSubscriber.php
@@ -2,9 +2,8 @@
 
 namespace Drupal\commerce_stripe_test\EventSubscriber;
 
-use Drupal\commerce_order\Event\OrderEvent;
 use Drupal\commerce_stripe\EventSubscriber\OrderPaymentIntentSubscriber;
-use Stripe\Error\Base as StripeError;
+use Stripe\Exception\ApiErrorException as StripeError;
 use Stripe\PaymentIntent;
 
 class DecoratedOrderPaymentIntentSubscriber extends OrderPaymentIntentSubscriber {
