diff --git a/includes/payment-methods/class-wc-gateway-stripe-sofort.php b/includes/payment-methods/class-wc-gateway-stripe-sofort.php
new file mode 100644
index 0000000..06744fd
--- /dev/null
+++ b/includes/payment-methods/class-wc-gateway-stripe-sofort.php
@@ -0,0 +1,308 @@
+<?php
+if ( ! defined( 'ABSPATH' ) ) {
+	exit;
+}
+
+/**
+ * Class that handles Sofort payment method.
+ *
+ * @extends WC_Gateway_Stripe
+ *
+ * @since 4.0.0
+ */
+class WC_Gateway_Stripe_Sofort extends WC_Stripe_Payment_Gateway {
+
+	const ID = 'stripe_sofort';
+
+	/**
+	 * Notices (array)
+	 *
+	 * @var array
+	 */
+	public $notices = [];
+
+	/**
+	 * Is test mode active?
+	 *
+	 * @var bool
+	 */
+	public $testmode;
+
+	/**
+	 * Alternate credit card statement name
+	 *
+	 * @var bool
+	 */
+	public $statement_descriptor;
+
+	/**
+	 * API access secret key
+	 *
+	 * @var string
+	 */
+	public $secret_key;
+
+	/**
+	 * Api access publishable key
+	 *
+	 * @var string
+	 */
+	public $publishable_key;
+
+	/**
+	 * Should we store the users credit cards?
+	 *
+	 * @var bool
+	 */
+	public $saved_cards;
+
+	/**
+	 * Constructor
+	 */
+	public function __construct() {
+		$this->id                 = 'stripe_sofort';
+		$this->method_title       = __( 'Stripe Sofort', 'woocommerce-gateway-stripe' );
+		$this->method_description = sprintf(
+		/* translators: 1) HTML anchor open tag 2) HTML anchor closing tag */
+			__( 'All other general Stripe settings can be adjusted %1$shere%2$s.', 'woocommerce-gateway-stripe' ),
+			'<a href="' . esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout&section=stripe' ) ) . '">',
+			'</a>'
+		);
+		$this->supports = [
+			'products',
+			'refunds',
+		];
+
+		// Load the form fields.
+		$this->init_form_fields();
+
+		// Load the settings.
+		$this->init_settings();
+
+		$main_settings              = get_option( 'woocommerce_stripe_settings' );
+		$this->title                = $this->get_option( 'title' );
+		$this->description          = $this->get_option( 'description' );
+		$this->enabled              = $this->get_option( 'enabled' );
+		$this->testmode             = ( ! empty( $main_settings['testmode'] ) && 'yes' === $main_settings['testmode'] ) ? true : false;
+		$this->saved_cards          = ( ! empty( $main_settings['saved_cards'] ) && 'yes' === $main_settings['saved_cards'] ) ? true : false;
+		$this->publishable_key      = ! empty( $main_settings['publishable_key'] ) ? $main_settings['publishable_key'] : '';
+		$this->secret_key           = ! empty( $main_settings['secret_key'] ) ? $main_settings['secret_key'] : '';
+		$this->statement_descriptor = ! empty( $main_settings['statement_descriptor'] ) ? $main_settings['statement_descriptor'] : '';
+
+		if ( $this->testmode ) {
+			$this->publishable_key = ! empty( $main_settings['test_publishable_key'] ) ? $main_settings['test_publishable_key'] : '';
+			$this->secret_key      = ! empty( $main_settings['test_secret_key'] ) ? $main_settings['test_secret_key'] : '';
+		}
+
+		add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, [ $this, 'process_admin_options' ] );
+		add_action( 'wp_enqueue_scripts', [ $this, 'payment_scripts' ] );
+	}
+
+	/**
+	 * Returns all supported currencies for this payment method.
+	 *
+	 * @since 4.0.0
+	 * @version 4.0.0
+	 * @return array
+	 */
+	public function get_supported_currency() {
+		return apply_filters(
+			'wc_stripe_sofort_supported_currencies',
+			[
+				'EUR',
+			]
+		);
+	}
+
+	/**
+	 * Checks to see if all criteria is met before showing payment method.
+	 *
+	 * @since 4.0.0
+	 * @version 4.0.0
+	 * @return bool
+	 */
+	public function is_available() {
+		if ( ! in_array( get_woocommerce_currency(), $this->get_supported_currency() ) ) {
+			return false;
+		}
+
+		return parent::is_available();
+	}
+
+	/**
+	 * Get_icon function.
+	 *
+	 * @since 1.0.0
+	 * @version 4.0.0
+	 * @return string
+	 */
+	public function get_icon() {
+		$icons = $this->payment_icons();
+
+		$icons_str = '';
+
+		$icons_str .= isset( $icons['sofort'] ) ? $icons['sofort'] : '';
+
+		return apply_filters( 'woocommerce_gateway_icon', $icons_str, $this->id );
+	}
+
+	/**
+	 * Outputs scripts used for stripe payment
+	 */
+	public function payment_scripts() {
+		if ( ! is_cart() && ! is_checkout() && ! isset( $_GET['pay_for_order'] ) && ! is_add_payment_method_page() ) {
+			return;
+		}
+
+		wp_enqueue_style( 'stripe_styles' );
+		wp_enqueue_script( 'woocommerce_stripe' );
+	}
+
+	/**
+	 * Initialize Gateway Settings Form Fields.
+	 */
+	public function init_form_fields() {
+		$this->form_fields = require WC_STRIPE_PLUGIN_PATH . '/includes/admin/stripe-sofort-settings.php';
+	}
+
+	/**
+	 * Payment form on checkout page
+	 */
+	public function payment_fields() {
+		global $wp;
+		$user        = wp_get_current_user();
+		$total       = WC()->cart->total;
+		$description = $this->get_description();
+
+		// If paying from order, we need to get total from order not cart.
+		if ( isset( $_GET['pay_for_order'] ) && ! empty( $_GET['key'] ) ) {
+			$order = wc_get_order( wc_clean( $wp->query_vars['order-pay'] ) );
+			$total = $order->get_total();
+		}
+
+		if ( is_add_payment_method_page() ) {
+			$pay_button_text = __( 'Add Payment', 'woocommerce-gateway-stripe' );
+			$total           = '';
+		} else {
+			$pay_button_text = '';
+		}
+
+		echo '<div
+			id="stripe-sofort-payment-data"
+			data-amount="' . esc_attr( WC_Stripe_Helper::get_stripe_amount( $total ) ) . '"
+			data-currency="' . esc_attr( strtolower( get_woocommerce_currency() ) ) . '">';
+
+		if ( $description ) {
+			echo apply_filters( 'wc_stripe_description', wpautop( wp_kses_post( $description ) ), $this->id );
+		}
+
+		echo '</div>';
+	}
+
+	/**
+	 * Creates the source for charge.
+	 *
+	 * @since 4.0.0
+	 * @version 4.0.0
+	 * @param object $order
+	 * @return mixed
+	 */
+	public function create_source( $order ) {
+		$currency              = $order->get_currency();
+		$bank_country          = $order->get_billing_country();
+		$return_url            = $this->get_stripe_return_url( $order );
+		$post_data             = [];
+		$post_data['amount']   = WC_Stripe_Helper::get_stripe_amount( $order->get_total(), $currency );
+		$post_data['currency'] = strtolower( $currency );
+		$post_data['type']     = 'sofort';
+		$post_data['owner']    = $this->get_owner_details( $order );
+		$post_data['redirect'] = [ 'return_url' => $return_url ];
+		$post_data['sofort']   = [
+			'country'            => $bank_country,
+			'preferred_language' => $this->get_locale(),
+		];
+
+		if ( ! empty( $this->statement_descriptor ) ) {
+			$post_data['statement_descriptor'] = WC_Stripe_Helper::clean_statement_descriptor( $this->statement_descriptor );
+		}
+
+		WC_Stripe_Logger::log( 'Info: Begin creating Sofort source' );
+
+		return WC_Stripe_API::request( apply_filters( 'wc_stripe_sofort_source', $post_data, $order ), 'sources' );
+	}
+
+	/**
+	 * Process the payment
+	 *
+	 * @param int  $order_id Reference.
+	 * @param bool $retry Should we retry on fail.
+	 * @param bool $force_save_source Force payment source to be saved.
+	 *
+	 * @throws Exception If payment will not be accepted.
+	 *
+	 * @return array|void
+	 */
+	public function process_payment( $order_id, $retry = true, $force_save_source = false ) {
+		try {
+			$order = wc_get_order( $order_id );
+
+			// This will throw exception if not valid.
+			$this->validate_minimum_order_amount( $order );
+
+			// This comes from the create account checkbox in the checkout page.
+			$create_account = ! empty( $_POST['createaccount'] ) ? true : false;
+
+			if ( $create_account ) {
+				$new_customer_id     = $order->get_customer_id();
+				$new_stripe_customer = new WC_Stripe_Customer( $new_customer_id );
+				$new_stripe_customer->create_customer();
+			}
+
+			$response = $this->create_source( $order );
+
+			if ( ! empty( $response->error ) ) {
+				$order->add_order_note( $response->error->message );
+
+				$localized_messages = WC_Stripe_Helper::get_localized_messages();
+
+				if ( 'invalid_sofort_country' === $response->error->code ) {
+					$localized_message = isset( $localized_messages[ $response->error->code ] ) ? $localized_messages[ $response->error->code ] : $response->error->message;
+				} else {
+					$localized_message = isset( $localized_messages[ $response->error->type ] ) ? $localized_messages[ $response->error->type ] : $response->error->message;
+				}
+
+				throw new WC_Stripe_Exception( print_r( $response, true ), $localized_message );
+			}
+
+			$order->update_meta_data( '_stripe_source_id', $response->id );
+			$order->save();
+
+			WC_Stripe_Logger::log( 'Info: Redirecting to Sofort...' );
+
+			return [
+				'result'   => 'success',
+				'redirect' => esc_url_raw( $response->redirect->url ),
+			];
+		} catch ( WC_Stripe_Exception $e ) {
+			wc_add_notice( $e->getLocalizedMessage(), 'error' );
+			WC_Stripe_Logger::log( 'Error: ' . $e->getMessage() );
+
+			do_action( 'wc_gateway_stripe_process_payment_error', $e, $order );
+
+			if ( $order->has_status(
+				apply_filters(
+					'wc_stripe_allowed_payment_processing_statuses',
+					[ 'pending', 'failed' ],
+					$order
+				)
+			) ) {
+				$this->send_failed_order_email( $order_id );
+			}
+
+			return [
+				'result'   => 'fail',
+				'redirect' => '',
+			];
+		}
+	}
+}
