diff --git a/src/EventSubscriber/CommerceOrderSubscriber.php b/src/EventSubscriber/CommerceOrderSubscriber.php
index f448fc0..bd8ba59 100644
--- a/src/EventSubscriber/CommerceOrderSubscriber.php
+++ b/src/EventSubscriber/CommerceOrderSubscriber.php
@@ -4,7 +4,7 @@ namespace Drupal\commerce_vipps\EventSubscriber;
 
 use Drupal\commerce_vipps\Event\ReturnFromVippsExpressEvent;
 use Drupal\commerce_vipps\Event\VippsEvents;
-use Drupal\commerce_vipps\VippsManager;
+use Drupal\commerce_vipps\VippsManagerInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\state_machine\Event\WorkflowTransitionEvent;
 use Psr\Log\LoggerInterface;
@@ -28,7 +28,7 @@ class CommerceOrderSubscriber implements EventSubscriberInterface {
   /**
    * The Vipps manager.
    *
-   * @var \Drupal\commerce_vipps\VippsManager
+   * @var \Drupal\commerce_vipps\VippsManagerInterface
    */
   protected $vippsManager;
 
@@ -51,14 +51,14 @@ class CommerceOrderSubscriber implements EventSubscriberInterface {
    *
    * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
    *   The entity manager.
-   * @param \Drupal\commerce_vipps\VippsManager $vippsManager
+   * @param \Drupal\commerce_vipps\VippsManagerInterface $vippsManager
    *   The vipps manager.
    * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher
    *   The event dispatcher.
    * @param \Psr\Log\LoggerInterface $logger
    *   The logger.
    */
-  public function __construct(EntityTypeManagerInterface $entityTypeManager, VippsManager $vippsManager, EventDispatcherInterface $eventDispatcher, LoggerInterface $logger) {
+  public function __construct(EntityTypeManagerInterface $entityTypeManager, VippsManagerInterface $vippsManager, EventDispatcherInterface $eventDispatcher, LoggerInterface $logger) {
     $this->entityTypeManager = $entityTypeManager;
     $this->vippsManager = $vippsManager;
     $this->eventDispatcher = $eventDispatcher;
diff --git a/src/Plugin/Commerce/PaymentGateway/Vipps.php b/src/Plugin/Commerce/PaymentGateway/Vipps.php
index 4e0b15c..a184d7d 100644
--- a/src/Plugin/Commerce/PaymentGateway/Vipps.php
+++ b/src/Plugin/Commerce/PaymentGateway/Vipps.php
@@ -8,11 +8,11 @@ use Drupal\commerce_payment\Exception\PaymentGatewayException;
 use Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\SupportsAuthorizationsInterface;
 use Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\SupportsNotificationsInterface;
 use Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\SupportsRefundsInterface;
-use Drupal\commerce_vipps\VippsManager;
 use Drupal\commerce_order\Entity\OrderInterface;
 use Drupal\commerce_payment\PaymentMethodTypeManager;
 use Drupal\commerce_payment\PaymentTypeManager;
 use Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\OffsitePaymentGatewayBase;
+use Drupal\commerce_vipps\VippsManagerInterface;
 use Drupal\Component\Datetime\TimeInterface;
 use Drupal\Component\Utility\Xss;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
@@ -49,7 +49,7 @@ class Vipps extends OffsitePaymentGatewayBase implements SupportsAuthorizationsI
    *
    * {@inheritdoc}
    */
-  public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, PaymentTypeManager $payment_type_manager, PaymentMethodTypeManager $payment_method_type_manager, TimeInterface $time, VippsManager $vippsManager) {
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, PaymentTypeManager $payment_type_manager, PaymentMethodTypeManager $payment_method_type_manager, TimeInterface $time, VippsManagerInterface $vippsManager) {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $payment_type_manager, $payment_method_type_manager, $time);
     $this->vippsManager = $vippsManager;
   }
@@ -274,6 +274,12 @@ class Vipps extends OffsitePaymentGatewayBase implements SupportsAuthorizationsI
     // If not specified, capture the entire amount.
     $amount = $amount ?: $payment->getAmount();
 
+    if ($amount->lessThan($payment->getAmount())) {
+      /** @var \Drupal\commerce_payment\Entity\PaymentInterface $parent_payment */
+      $parent_payment = $payment;
+      $payment = $parent_payment->createDuplicate();
+    }
+
     $remote_id = $payment->getRemoteId();
     $number = $amount->multiply(100)->getNumber();
     try {
@@ -308,6 +314,15 @@ class Vipps extends OffsitePaymentGatewayBase implements SupportsAuthorizationsI
     $payment->setState('completed');
     $payment->setAmount($amount);
     $payment->save();
+
+    // Update parent payment if one exists.
+    if (isset($parent_payment)) {
+      $parent_payment->setAmount($parent_payment->getAmount()->subtract($amount));
+      if ($parent_payment->getAmount()->isZero()) {
+        $parent_payment->setState('authorization_voided');
+      }
+      $parent_payment->save();
+    }
   }
 
   /**
diff --git a/src/PluginForm/OffsiteRedirect/VippsLandingPageRedirectForm.php b/src/PluginForm/OffsiteRedirect/VippsLandingPageRedirectForm.php
index 29ae175..f1b83a8 100644
--- a/src/PluginForm/OffsiteRedirect/VippsLandingPageRedirectForm.php
+++ b/src/PluginForm/OffsiteRedirect/VippsLandingPageRedirectForm.php
@@ -7,7 +7,7 @@ use Drupal\commerce_payment\PluginForm\PaymentOffsiteForm as BasePaymentOffsiteF
 use Drupal\commerce_vipps\Event\InitiatePaymentOptionsEvent;
 use Drupal\commerce_vipps\Event\VippsEvents;
 use Drupal\commerce_vipps\Resolver\ChainOrderIdResolverInterface;
-use Drupal\commerce_vipps\VippsManager;
+use Drupal\commerce_vipps\VippsManagerInterface;
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
 use Drupal\Core\Form\FormStateInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -44,14 +44,14 @@ class VippsLandingPageRedirectForm extends BasePaymentOffsiteForm implements Con
   /**
    * VippsLandingPageRedirectForm constructor.
    *
-   * @param \Drupal\commerce_vipps\VippsManager $vippsManager
+   * @param \Drupal\commerce_vipps\VippsManagerInterface $vippsManager
    *   The vipps manager.
    * @param \Drupal\commerce_vipps\Resolver\ChainOrderIdResolverInterface $chainOrderIdResolver
    *   The chain order id resolver.
    * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher
    *   The event dispatcher.
    */
-  public function __construct(VippsManager $vippsManager, ChainOrderIdResolverInterface $chainOrderIdResolver, EventDispatcherInterface $eventDispatcher) {
+  public function __construct(VippsManagerInterface $vippsManager, ChainOrderIdResolverInterface $chainOrderIdResolver, EventDispatcherInterface $eventDispatcher) {
     $this->vippsManager = $vippsManager;
     $this->chainOrderIdResolver = $chainOrderIdResolver;
     $this->eventDispatcher = $eventDispatcher;
diff --git a/src/VippsManager.php b/src/VippsManager.php
index dc90e40..4bcb645 100644
--- a/src/VippsManager.php
+++ b/src/VippsManager.php
@@ -11,7 +11,7 @@ use zaporylie\Vipps\Vipps;
 /**
  * Vipps Manager.
  */
-class VippsManager {
+class VippsManager implements VippsManagerInterface {
 
   /**
    * The http client.
diff --git a/src/VippsManagerInterface.php b/src/VippsManagerInterface.php
new file mode 100644
index 0000000..2df65d5
--- /dev/null
+++ b/src/VippsManagerInterface.php
@@ -0,0 +1,17 @@
+<?php
+
+namespace Drupal\commerce_vipps;
+
+use Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\PaymentGatewayInterface;
+
+/**
+ * Vipps Manager.
+ */
+interface VippsManagerInterface {
+
+  /**
+   * Get Payment Manager.
+   */
+  public function getPaymentManager(PaymentGatewayInterface $paymentGateway);
+
+}
diff --git a/tests/modules/commerce_vipps_test_client/commerce_vipps_test_client.info.yml b/tests/modules/commerce_vipps_test_client/commerce_vipps_test_client.info.yml
new file mode 100644
index 0000000..369de93
--- /dev/null
+++ b/tests/modules/commerce_vipps_test_client/commerce_vipps_test_client.info.yml
@@ -0,0 +1,7 @@
+name: Commerce Vipps Test Client
+description: Provides testing items for Commerce Vipps
+core: 8.x
+type: module
+dependencies:
+  - commerce:commerce_payment
+  - commerce_vipps:commerce_vipps
diff --git a/tests/modules/commerce_vipps_test_client/commerce_vipps_test_client.services.yml b/tests/modules/commerce_vipps_test_client/commerce_vipps_test_client.services.yml
new file mode 100644
index 0000000..2b354cf
--- /dev/null
+++ b/tests/modules/commerce_vipps_test_client/commerce_vipps_test_client.services.yml
@@ -0,0 +1,4 @@
+services:
+  commerce_vipps_test_client.manager:
+    class: Drupal\commerce_vipps_test_client\VippsManager
+    decorates: commerce_vipps.manager
diff --git a/tests/modules/commerce_vipps_test_client/src/VippsManager.php b/tests/modules/commerce_vipps_test_client/src/VippsManager.php
new file mode 100644
index 0000000..a9ead58
--- /dev/null
+++ b/tests/modules/commerce_vipps_test_client/src/VippsManager.php
@@ -0,0 +1,74 @@
+<?php
+
+namespace Drupal\commerce_vipps_test_client;
+
+use Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\PaymentGatewayInterface;
+use Drupal\commerce_vipps\VippsManagerInterface;
+use zaporylie\Vipps\Api\PaymentInterface;
+
+/**
+ * Mock of a VippsManager.
+ *
+ * @package Drupal\commerce_vipps_test_client
+ */
+class VippsManager implements VippsManagerInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getPaymentManager(PaymentGatewayInterface $paymentGateway) {
+    return new class implements PaymentInterface {
+
+      /**
+       * {@inheritdoc}
+       */
+      public function initiatePayment(
+        $order_id,
+        $amount,
+        $text,
+        $callbackPrefix,
+        $fallback,
+        $options = []
+      ) {
+        throw new \RuntimeException('Method is not implemented');
+      }
+
+      /**
+       * {@inheritdoc}
+       */
+      public function capturePayment($order_id, $text, $amount = 0) {
+        return 'ok';
+      }
+
+      /**
+       * {@inheritdoc}
+       */
+      public function cancelPayment($order_id, $text) {
+        throw new \RuntimeException('Method is not implemented');
+      }
+
+      /**
+       * {@inheritdoc}
+       */
+      public function refundPayment($order_id, $text, $amount = 0) {
+        throw new \RuntimeException('Method is not implemented');
+      }
+
+      /**
+       * {@inheritdoc}
+       */
+      public function getOrderStatus($order_id) {
+        throw new \RuntimeException('Method is not implemented');
+      }
+
+      /**
+       * {@inheritdoc}
+       */
+      public function getPaymentDetails($order_id) {
+        throw new \RuntimeException('Method is not implemented');
+      }
+
+    };
+  }
+
+}
diff --git a/tests/src/Kernel/CaptureTest.php b/tests/src/Kernel/CaptureTest.php
new file mode 100644
index 0000000..5c47b2b
--- /dev/null
+++ b/tests/src/Kernel/CaptureTest.php
@@ -0,0 +1,160 @@
+<?php
+
+namespace Drupal\Tests\commerce_vipps\Kernel;
+
+use Drupal\commerce_order\Entity\Order;
+use Drupal\commerce_order\Entity\OrderItem;
+use Drupal\commerce_payment\Entity\Payment;
+use Drupal\commerce_payment\Entity\PaymentGateway;
+use Drupal\commerce_price\Price;
+use Drupal\Tests\commerce_order\Kernel\OrderKernelTestBase;
+
+/**
+ * Class PartialCaptureTest.
+ *
+ * @package Drupal\Tests\commerce_vipps\Kernel
+ * @group commerce_vipps
+ */
+class CaptureTest extends OrderKernelTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = [
+    'commerce',
+    'commerce_price',
+    'commerce_order',
+    'commerce_payment',
+    'commerce_vipps',
+    'commerce_vipps_test_client',
+  ];
+
+  /**
+   * The payment gateway entity.
+   *
+   * @var \Drupal\commerce_payment\Entity\PaymentGatewayInterface
+   */
+  protected $paymentGateway;
+
+  /**
+   * The user entity.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $user;
+
+  /**
+   * The order entity.
+   *
+   * @var \Drupal\commerce_order\Entity\OrderInterface
+   */
+  protected $order;
+
+  /**
+   * The payment entity.
+   *
+   * @var \Drupal\commerce_payment\Entity\PaymentInterface
+   */
+  protected $payment;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    $this->installEntitySchema('commerce_payment');
+    $this->installEntitySchema('commerce_payment_method');
+    $this->installConfig('commerce_payment');
+
+    $user = $this->createUser();
+    $this->user = $this->reloadEntity($user);
+
+    $currency_importer = $this->container->get('commerce_price.currency_importer');
+    $currency_importer->import('NOK');
+    $this->store = $this->createStore('Default store', 'admin@example.com', 'online', TRUE, 'NO', 'NOK');
+
+    /** @var \Drupal\commerce_payment\Entity\PaymentGatewayInterface $payment_gateway */
+    $payment_gateway = PaymentGateway::create([
+      'id' => 'commerce_vipps',
+      'label' => 'Commerce Vipps',
+      'plugin' => 'vipps',
+    ]);
+    $payment_gateway->setPluginConfiguration([
+      'client_id' => '123',
+      'subscription_key_authorization' => '456',
+      'client_secret' => '789',
+      'subscription_key_payment' => '123',
+      'serial_number' => '456',
+    ]);
+    $payment_gateway->save();
+    $this->paymentGateway = $this->reloadEntity($payment_gateway);
+
+    $order_item = OrderItem::create([
+      'type' => 'test',
+      'quantity' => 1,
+      'unit_price' => new Price('10', 'NOK'),
+    ]);
+    $order_item->save();
+
+    $order = Order::create([
+      'uid' => $this->user,
+      'type' => 'default',
+      'state' => 'draft',
+      'order_items' => [$order_item],
+      'store_id' => $this->store,
+    ]);
+    $order->save();
+    $this->order = $this->reloadEntity($order);
+
+    /** @var \Drupal\commerce_payment\Entity\PaymentInterface $payment */
+    $payment = Payment::create([
+      'type' => 'payment_default',
+      'payment_gateway' => $payment_gateway->id(),
+      'order_id' => $this->order->id(),
+      'amount' => new Price('10', 'NOK'),
+      'state' => 'authorization',
+    ]);
+    $payment->save();
+    $this->payment = $this->reloadEntity($payment);
+    $count = $this->entityTypeManager->getStorage('commerce_payment')->getQuery()->condition('order_id', $this->order->id())->count()->execute();
+    $this->assertEqual($count, 1);
+  }
+
+  /**
+   * Performs full capture (on amount).
+   */
+  public function testFullCapture() {
+    /** @var \Drupal\commerce_vipps\Plugin\Commerce\PaymentGateway\Vipps $plugin */
+    $plugin = $this->paymentGateway->getPlugin();
+    $plugin->capturePayment($this->payment, Price::fromArray(['number' => 10, 'currency_code' => 'NOK']));
+    $count = $this->entityTypeManager->getStorage('commerce_payment')->getQuery()->condition('order_id', $this->order->id())->count()->execute();
+    $this->assertEqual($count, 1);
+    $this->assertEqual($this->payment->getState()->getId(), 'completed');
+  }
+
+  /**
+   * Performs partial capture.
+   */
+  public function testPartialCapture() {
+    // Perform partial capture on amount.
+    /** @var \Drupal\commerce_vipps\Plugin\Commerce\PaymentGateway\Vipps $plugin */
+    $plugin = $this->paymentGateway->getPlugin();
+    $plugin->capturePayment($this->payment, Price::fromArray(['number' => 6, 'currency_code' => 'NOK']));
+    $count = $this->entityTypeManager->getStorage('commerce_payment')->getQuery()->condition('order_id', $this->order->id())->count()->execute();
+    $this->assertEqual($count, 2);
+    $this->assertEqual($this->payment->getAmount()->getNumber(), 4);
+    $this->assertEqual($this->payment->getState()->getId(), 'authorization');
+    $this->assertEqual($this->entityTypeManager->getStorage('commerce_payment')->getQuery()->condition('order_id', $this->order->id())->condition('state', 'completed')->count()->execute(), 1);
+
+    // Perform capture on remaining amount.
+    /** @var \Drupal\commerce_vipps\Plugin\Commerce\PaymentGateway\Vipps $plugin */
+    $plugin = $this->paymentGateway->getPlugin();
+    $plugin->capturePayment($this->payment);
+    $count = $this->entityTypeManager->getStorage('commerce_payment')->getQuery()->condition('order_id', $this->order->id())->count()->execute();
+    $this->assertEqual($count, 2);
+    $this->assertEqual($this->payment->getAmount()->getNumber(), 4);
+    $this->assertEqual($this->payment->getState()->getId(), 'completed');
+  }
+
+}
