If you’re trying to purchase something on your Mac, most of the time you’re going to have to authorize the download and then the app will start downloading. However, you may receive a pop-up error saying, “An error occurred during purchase. The operation couldn’t be completed (com.apple.commerce.client error 500.).
This error can stop you from downloading apps because the App Store is unable to complete the operation.
The Reason you get the Error
The reason you get the An Error Occurred During Purchase pop is mainly because your Apple system Preference files are corrupted. Your Mac’s system preference files are files that store the rules that tell your apps how they should work. You’ll need to delete and restore these preference files to get rid of the error.
1. Delete Apple Preference Files
Since the Apple preference files that have parameters to tell the App Store what to do are broken, they’ll need to be fixed in order for the App Store to operate normally.
For example, your preference files tell the App Store what to do when you want to download an app. If the parameters are incorrect, the App Store on your Mac won’t know what to do when you try and download an app.
To delete corrupted preference files:
- Close all of your Mac applications
- Open the Finder
- Click Go > Go to Folder.
- Go to -/Library/Preferences.
- Look for the following files:
- Delete these corrupted files.
- Restart your Mac.
- Open the Mac store and check if you can download apps.
2. Run Command in Terminal
- The next way to fix this is by running a command in the terminal apps.
- Go to the App Store.
- Click Store.
- Select Sign Out.
- Close the App.
- Go to Applications > Utilities.
- Enter the following command:
defaults write com.apple.appstore.commerce Storefront -string “$(defaults read com.apple.appstore.commerce Storefront | sed s/,8/,13/)”
3. Sign out of iCloud
The next thing you can do is to sign out of iCloud. iCloud stores all of your App store related info in so signing back into iCloud might fix the problem.
To sign out of your MAC:
- Go to Apple menu.
- Click on System Preferences.
- Click iCloud.
- Click Sign Out. Keep all the copies of your iCloud data.
- Open the App Store.
- Sign into the App Store. Try and purchase an app and check if it works.
4. Check Apple Servers
Another reason why you can’t download apps on the App Store is that Apple Servers may be down Sometimes Apple does maintenance on some of their applications and this can cause certain systems to go down without any notice.
Another reason their server could go down is that there are too many IP requests coming to the server trying to access App Store, and because of the number of requests, the server can’t respond to all of them. This can stop you from purchasing things from the iTunes Store, iBooks Store, Films, and Mac App Store.
5. Internet Connection
If you haven’t got a good internet connection, this can stop you from purchasing anything. You’ll need to troubleshoot your internet connection to see what’s causing the problem.
- Click the Apple logo.
- Go to System Preferences.
- Click on Network. You should see a list of networks in the left panel.
Check for a green dot. If you see this next to your network, it means that you have a good connection. However, if you see a red dot, you can restart your router in an attempt to troubleshoot the problem.
6. Delete Corrupted App Store Files
- Open the Terminal.
- Enter the following command and enter it:
open $TMPDIR../C/com.apple.appstore/. This will open the com.apple.appstore folder.
- Delete the contents of this folder. If you’re unsure, you can copy the contents of this folder and move it somewhere else before deleting in the com.apple.appstore folder.
- Restart your Mac.
- Open the App Store. Check if you still get the error when you try and purchase something.