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:

  1. Close all of your Mac applications
  2. Open the Finder
  3. Click Go > Go to Folder.
  4. Go to -/Library/Preferences.
  5. Look for the following files:
  • com.apple.storeagent.plist
  • com.apple.appstore.plist
  • com.apple.appstore.commerce.plist
  1. Delete these corrupted files.
  2. Restart your Mac.
  3. Open the Mac store and check if you can download apps.

2. Run Command in Terminal

  1. The next way to fix this is by running a command in the terminal apps.
  2. Go to the App Store.
  3. Click Store.
  4. Select Sign Out.
  5. Close the App.
  6. Go to Applications > Utilities.
  7. 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:

  1. Go to Apple menu.
  2. Click on System Preferences.
  3. Click iCloud.
  4. Click Sign Out. Keep all the copies of your iCloud data.
  5. Open the App Store.
  6. 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.

  1. Click the Apple logo.
  2. Go to System Preferences.
  3. 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

  1. Open the Terminal.
  2. Enter the following command and enter it:

open $TMPDIR../C/com.apple.appstore/. This will open the com.apple.appstore folder.

  1. 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.
  2. Restart your Mac.
  3. Open the App Store. Check if you still get the error when you try and purchase something.