diff --git a/CRM/Core/Payment/Stripe.php b/CRM/Core/Payment/Stripe.php
index 12d724df792c816ddfcc77f5a7cfc7d2493d259a..271fd66b436657e4ff2e6a2a815575bc026a7d13 100644
--- a/CRM/Core/Payment/Stripe.php
+++ b/CRM/Core/Payment/Stripe.php
@@ -287,6 +287,7 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
         // Too many requests made to the API too quickly
       case 'Stripe\Exception\InvalidRequestException':
         // Invalid parameters were supplied to Stripe's API
+        $genericError['code'] = $e->getError()->code;
       case 'Stripe\Exception\AuthenticationException':
         // Authentication with Stripe's API failed
         // (maybe you changed API keys recently)