Credit Card Decline Codes

We created a json array keyed to the credit card decline code to add to your options table (or wherever).

We added an action column that suits our purposes. You may wish to ignore or change.

This is not guaranteed accurate or exhaustive as there is no legal standard. But it’s a great start. Feel free to email us if you find errors or uncover worthwhile additions.

a:50:{i:1;a:2:{s:6:"reason";s:20:"01: Refer to issuer";s:6:"action";s:7:"contact";}i:2;a:2:{s:6:"reason";s:40:"02: Refer to issuer (special condition)";s:6:"action";s:7:"contact";}i:3;a:2:{s:6:"reason";s:21:"03: Invalid merchant";s:6:"action";s:5:"block";}i:4;a:2:{s:6:"reason";s:28:"04: Pick up card (no fraud)";s:6:"action";s:5:"block";}i:5;a:2:{s:6:"reason";s:17:"05: Do not honor";s:6:"action";s:7:"contact";}i:6;a:2:{s:6:"reason";s:10:"06: Error";s:6:"action";s:5:"error";}i:7;a:2:{s:6:"reason";s:25:"07: Pick up card (fraud)";s:6:"action";s:5:"block";}i:10;a:2:{s:6:"reason";s:21:"10: Partial approval";s:6:"action";s:5:"error";}i:12;a:2:{s:6:"reason";s:24:"12: Invalid transaction";s:6:"action";s:5:"error";}i:13;a:2:{s:6:"reason";s:19:"13: Invalid amount";s:6:"action";s:5:"error";}i:14;a:2:{s:6:"reason";s:27:"14: Invalid account number";s:6:"action";s:7:"contact";}i:15;a:2:{s:6:"reason";s:19:"15: No such issuer";s:6:"action";s:7:"contact";}i:19;a:2:{s:6:"reason";s:25:"19: Re-enter transaction";s:6:"action";s:5:"error";}i:21;a:2:{s:6:"reason";s:20:"21: No action taken";s:6:"action";s:5:"error";}i:25;a:2:{s:6:"reason";s:36:"25: Unable to locate record in file";s:6:"action";s:5:"block";}i:28;a:2:{s:6:"reason";s:56:"28: File temporarily not available for update or injury";s:6:"action";s:5:"block";}i:41;a:2:{s:6:"reason";s:23:"41: Lost card, pick up";s:6:"action";s:5:"block";}i:43;a:2:{s:6:"reason";s:25:"43: Stolen card, pick up";s:6:"action";s:5:"block";}i:51;a:2:{s:6:"reason";s:23:"51: Insufficient funds";s:6:"action";s:5:"retry";}i:52;a:2:{s:6:"reason";s:24:"52: No checking account";s:6:"action";s:7:"contact";}i:53;a:2:{s:6:"reason";s:23:"53: No savings account";s:6:"action";s:7:"contact";}i:54;a:2:{s:6:"reason";s:17:"54: Expired card";s:6:"action";s:7:"contact";}i:55;a:2:{s:6:"reason";s:18:"55: Incorrect PIN";s:6:"action";s:7:"contact";}i:57;a:2:{s:6:"reason";s:37:"57: Transaction not permitted—card";s:6:"action";s:5:"error";}i:58;a:2:{s:6:"reason";s:41:"58: Transaction not permitted—terminal";s:6:"action";s:5:"error";}i:59;a:2:{s:6:"reason";s:20:"59: Suspected fraud";s:6:"action";s:5:"block";}i:61;a:2:{s:6:"reason";s:34:"61: Exceeds approval amount limit";s:6:"action";s:5:"error";}i:62;a:2:{s:6:"reason";s:36:"62: Invalid/restricted service code";s:6:"action";s:5:"error";}i:63;a:2:{s:6:"reason";s:23:"63: Security violation";s:6:"action";s:5:"block";}i:64;a:2:{s:6:"reason";s:49:"64: Transaction does not fulfill AML requirement";s:6:"action";s:5:"error";}i:65;a:2:{s:6:"reason";s:29:"65: Exceeds withdrawal limit";s:6:"action";s:5:"error";}i:70;a:2:{s:6:"reason";s:22:"70: PIN data required";s:6:"action";s:5:"error";}i:75;a:2:{s:6:"reason";s:49:"75: Allowable number of PIN entry tries exceeded";s:6:"action";s:5:"error";}i:76;a:2:{s:6:"reason";s:25:"76: Unsolicited reversal";s:6:"action";s:5:"block";}i:78;a:2:{s:6:"reason";s:23:"78: Blocked, first use";s:6:"action";s:7:"contact";}i:79;a:2:{s:6:"reason";s:21:"79: Already reversed";s:6:"action";s:5:"block";}i:80;a:2:{s:6:"reason";s:24:"80: System not available";s:6:"action";s:5:"retry";}i:82;a:2:{s:6:"reason";s:45:"82: Negative CAM, dCVV, iCVV, or CVV results";s:6:"action";s:5:"error";}i:85;a:2:{s:6:"reason";s:25:"85: No reason to decline";s:6:"action";s:5:"error";}i:86;a:2:{s:6:"reason";s:22:"86: Cannot verify PIN";s:6:"action";s:5:"error";}i:91;a:2:{s:6:"reason";s:33:"91: Issuer or switch unavailable";s:6:"action";s:5:"retry";}i:92;a:2:{s:6:"reason";s:32:"92: Unable to route transaction";s:6:"action";s:5:"error";}i:93;a:2:{s:6:"reason";s:56:"93: Transaction can’t be completed—violation of law";s:6:"action";s:5:"error";}i:94;a:2:{s:6:"reason";s:37:"94: Duplication transaction detected ";s:6:"action";s:5:"error";}i:96;a:2:{s:6:"reason";s:17:"96: System error";s:6:"action";s:5:"retry";}i:97;a:2:{s:6:"reason";s:16:"97: Invalid CVV";s:6:"action";s:7:"contact";}s:2:"9G";a:2:{s:6:"reason";s:45:"9G: Blocked by cardholder/contact cardholder";s:6:"action";s:7:"contact";}s:2:"1A";a:2:{s:6:"reason";s:48:"1A: Additional customer authentication required";s:6:"action";s:7:"contact";}s:2:"R0";a:2:{s:6:"reason";s:49:"R0: Recurring charge stopped at customer request";s:6:"action";s:7:"contact";}s:2:"R1";a:2:{s:6:"reason";s:49:"R1: Recurring charge stopped at customer request";s:6:"action";s:7:"contact";}}

Here is a snippet to upload your own csv. We had columns reason, code and action in that order. Modify to suit.

function create_decline_code_array() {
   $target_file = path_to_your_file/codes.csv';
   $array = [];

   if (($handle = fopen($target_file, 'r')) !== FALSE) {
      // If  your file has a header row. You can also use these as keys
      $headers = fgetcsv($handle, 1000, ',');

      while (($row = fgetcsv($handle, 1000, ',')) !== FALSE) {
        // Combine headers with row values to create associative pairs here. We just used the numeric keys in column order
        $array[$row[1]] = ['reason' => $row[0], 'action' => $row[2]];
      }
      fclose($handle);
   }
   // update the options table
   update_option('decline_codes', $array);
}