This could be some kind of IP Spoofing. Here is how such a scam could work. The scammer gains access to the husband’s credit card details, either through a data breach, phishing, or skimming. To make fraudulent purchases or create accounts using the stolen card, the scammer uses a proxy or VPN to spoof the IP address so that it appears to come from the spouse’s iPhone IP or the same general geographic location. This is done to bypass merchant fraud detection systems that flag suspicious transactions coming from unexpected locations.
The fraudulent orders or transactions then appear as if they originated from the spouse’s iPhone IP address, tying the husband’s credit card fraud to the spouse’s IP. Sometimes scammers add stolen credit cards to digital wallets (like Apple Wallet) quickly after acquiring the card details, making unauthorized purchases appear as if done from a trusted device. Since IP addresses are regularly used by merchants for geolocation and fraud assessment, spoofing an IP address within the home or spouse’s network helps the scammers avoid triggering alarms about unusual activity.
The scam may also include social engineering or phishing to gather more personal info to make the fraud harder to detect and trace. Thus, the scam is not about hacking the iPhone itself, but about using the spouse’s IP address as a trusted geolocation proxy to hide fraudulent credit card activity and make it appear legitimate to merchants and fraud detection algorithms.
The IP address is obtained by several possible means, but in this scenario the OP’s iPhone probably connected to a compromised public WiFi network. Sometimes scam websites are used to capture IP addresses. Social engineering is always a possibility too.