diff --git a/CRM/Core/Payment/StripeIPN.php b/CRM/Core/Payment/StripeIPN.php
index 40eb15e7206c9182f73f1bbe9d84a5c802e811c0..a78d7a163ed3c9d3c0f4d59d2101bbb6d8bb2462 100644
--- a/CRM/Core/Payment/StripeIPN.php
+++ b/CRM/Core/Payment/StripeIPN.php
@@ -733,11 +733,17 @@ class CRM_Core_Payment_StripeIPN {
         $message = $this->_paymentProcessor->getPaymentProcessorLabel() . 'No matching contributions for event ' . $this->getEventID();
         Civi::log()->debug($message);
       }
-      CRM_Mjwshared_Hook::webhookEventNotMatched('stripe', $this, 'contribution_not_found');
-      return FALSE;
+      $result = NULL;
+      CRM_Mjwshared_Hook::webhookEventNotMatched('stripe', $this, 'contribution_not_found', $result);
+      if (empty($result['contribution'])) {
+        return FALSE;
+      }
+      $this->contribution = $result['contribution'];
+    }
+    else {
+      $this->contribution = $contribution['values'][$contribution['id']];
     }
 
-    $this->contribution = $contribution['values'][$contribution['id']];
     return TRUE;
   }