diff --git a/src/Controller/StripeChargeController.php b/src/Controller/StripeChargeController.php
index 1f19ea2..0fb687f 100644
--- a/src/Controller/StripeChargeController.php
+++ b/src/Controller/StripeChargeController.php
@@ -24,6 +24,11 @@ class StripeChargeController extends ControllerBase {
   protected $stripeApiStripeApi;
 
   /**
+   * Drupal\Core\Entity\EntityTypeManager.
+   */
+  protected $entityTypeManager;
+
+  /**
    * {@inheritdoc}
    */
   public function __construct(StripeApiService $stripe_api_stripe_api) {
@@ -50,16 +55,17 @@ class StripeChargeController extends ControllerBase {
     try {
       $token = $request->get('stripeToken');
       $entity_id = $request->get('entity_id');
+      $entity_type = $request->get('entity_type');
       $field_name = $request->get('field_name');
 
       if (!$token || !$entity_id || !$field_name) {
         throw new \Exception("Required data is missing!");
       }
 
-      // Load the price from the node that was purchased.
-      $node = $this->entityTypeManager()->getStorage('node')->load($entity_id);
-      $amount = $node->$field_name->value;
-      $field_settings = $node->$field_name->getSettings();
+      // Load the price from the entity that was purchased.
+      $entity = $this->entityTypeManager()->getStorage($entity_type)->load($entity_id);
+      $amount = $entity->$field_name->value;
+      $field_settings = $entity->$field_name->getSettings();
       $currency = $field_settings['currency'];
       $user = \Drupal::currentUser()->getAccount();
 
@@ -67,10 +73,11 @@ class StripeChargeController extends ControllerBase {
         // Convert to cents.
         "amount" => $amount * 100,
         "source" => $token,
-        "description" => $this->t('Purchase of @title', ['@title' => $node->label()]),
+        "description" => $this->t('Purchase of @title', ['@title' => $entity->label()]),
         'currency' => $currency,
         "metadata" => [
           'entity_id' => $entity_id,
+          'entity_type' => $entity_type,
           'uid' => $user->id(),
         ],
       ));
@@ -87,11 +94,20 @@ class StripeChargeController extends ControllerBase {
         // In addition to the webhook, we fire a traditional Drupal hook to permit other modules to respond to this event instantaneously.
         $this->moduleHandler()->invokeAll('stripe_checkout_charge_succeeded', [
           $charge,
-          $node,
+          $entity,
           $user,
         ]);
 
-        return $this->redirect('entity.node.canonical', array('node' => $entity_id));
+        // $entity may not have a link template, in which case, return to the current route.
+        if ($entity->hasLinkTemplate('canonical')) {
+          $route_name = $entity->toUrl()->getRouteName();
+          return $this->redirect($route_name, array($entity_type => $entity->id()));
+        }
+        else {
+          $redirect = Url::fromRoute('<current>')->getInternalPath();
+          // @TODO This needs some testing.
+          return $this->redirect($redirect);
+        } 
       }
       else {
         drupal_set_message(t("Payment failed."), 'error');
diff --git a/src/Plugin/Field/FieldFormatter/StripeCheckoutFormatter.php b/src/Plugin/Field/FieldFormatter/StripeCheckoutFormatter.php
index 064c173..917b0f1 100644
--- a/src/Plugin/Field/FieldFormatter/StripeCheckoutFormatter.php
+++ b/src/Plugin/Field/FieldFormatter/StripeCheckoutFormatter.php
@@ -86,6 +86,7 @@ class StripeCheckoutFormatter extends FormatterBase {
         ],
         '#price' => $price,
         '#entity_id' => $item->getEntity()->id(),
+        '#entity_type' => $item->getEntity()->getEntityTypeId(),
         '#field_name' => $item->getFieldDefinition()->getName(),
         '#logged_in' => \Drupal::currentUser()->isAuthenticated(),
         "#anon_url" => Url::fromRoute('user.register', [], [
diff --git a/stripe_checkout.module b/stripe_checkout.module
index 739fabc..257bc28 100644
--- a/stripe_checkout.module
+++ b/stripe_checkout.module
@@ -23,6 +23,7 @@ function stripe_checkout_theme($existing, $type, $theme, $path) {
         'logged_in' => NULL,
         'entity_id' => NULL,
         'field_name' => NULL,
+        'entity_type' => NULL,
       ),
     ),
   );
diff --git a/templates/stripe-checkout.html.twig b/templates/stripe-checkout.html.twig
index 102f554..34b3ae5 100644
--- a/templates/stripe-checkout.html.twig
+++ b/templates/stripe-checkout.html.twig
@@ -15,6 +15,7 @@
     </script>
     <input type="hidden" name="entity_id" value="{{ entity_id }}"/>
     <input type="hidden" name="field_name" value="{{ field_name }}"/>
+    <input type="hidden" name="entity_type" value="{{ entity_type }}"/>
   </form>
 {% else %}
   <a href="{{ anon_url }}" class="stripe-button button">{{ 'Sign up & buy'|t }}</a>
