After further search on my end the error is not a declined/old card, it's an issue with the payment ID/profile that's being stored in the CIM interface. FYI this is only happening to us on RECURRING ORDERS only, not regular 1-off orders.
<response>
<resultCode>Error</resultCode>
<directResponse />
<messages>
<message>
<code>E00040</code>
<text>Customer Profile ID or Customer Payment Profile ID not found.</text>
</message>
</messages>
</response>
After discussion with authorize.net support on this issue, here is what they said:
E00040 – The record cannot be found. (CIM only)
This error occurs if the profileId, paymentProfileId, or shippingAddressId is not valid. There are multiple possible causes, which may include:
Confusion over the differences between profile IDs and payment profile IDs;
Issues when storing ID numbers;
Using an ID number from one account's CIM setup when submitting to another account's CIM setup.
Note that profile IDs, payment profile IDs, and shipping address IDs are not transferrable between accounts.
They said that the developer would know what to do with this info so I am passing it on to you along with a link they sent (which I am sure you guys already know about!) https://community.developer.authorize.net/
Hope this helps and can be fixed asap :)