diff --git a/CRM/Core/Payment/StripeIPN.php b/CRM/Core/Payment/StripeIPN.php
index b62befd8163a97377cede6ef27c0347d8b5590e3..18761de2d17f0f0a774ad2dedc489ed9d28d59ec 100644
--- a/CRM/Core/Payment/StripeIPN.php
+++ b/CRM/Core/Payment/StripeIPN.php
@@ -237,6 +237,12 @@ class CRM_Core_Payment_StripeIPN extends CRM_Core_Payment_BaseIPN {
 
       // One-time donation and per invoice payment.
       case 'charge.failed':
+        // If we don't have a customer_id we can't do anything with it!
+        // It's quite likely to be a fraudulent/spam so we ignore.
+        if (empty(CRM_Stripe_Api::getObjectParam('customer_id', $this->_inputParameters->data->object))) {
+          return TRUE;
+        }
+
         $this->setInfo();
         $params = [
           'id' => $this->contribution['id'],