Showing results for 
Search instead for 
Did you mean: 

Transactions of this market type cannot be processed on this system.

I'm setting up  AuthorizeNetAPI, and I have it working just fine for my card not present account - my ecom site.  I have another account that is card present - for my retail store, and I'm trying to implement a feature where someone can order a product from my ecom site, and that order would go to the retail store account.


I tried to simply change my credientials, and I get this error:


Transaction Failed Error Code : 87 Error Message : Transactions of this market type cannot be processed on this system.


I did some research, and believe I need to change the market type on my request - but I cannot figure out how this is done.


Anyone has some advice they could spare?



Accepted Solutions

All of the PHP applications in the SDK use cURL. Example code from the PHP SDK for cardPresent transactions is at:

Powered by -
Certified developers

View solution in original post


What API call are you making? If you are obtaining a Token with one account's credentials, then charging the card with another, that woud be good reason for the error.


If you are sure you are not doing the above, check the value of the marketType element that is being posted is appropriate for your account and transaction, "marketType" value should be "2" for Card Present transactions.


The retail element contains two elements: marketType and deviceType.

If you submit the retail element, the marketType and DeviceType elements are required.
marketType [0,1,2]

0 for ecommerce
1 for moto
2 for retail

deviceType [1, 2, 3, 4, 5, 7, 8, 9, 10]
1 = Unknown
2 = Unattended Terminal
3 = Self Service Terminal
4 = Electronic Cash Register
5 = Personal Computer- Based Terminal
7 = Wireless POS
8 = Website
9 = Dial Terminal
10 = Virtual Terminal


Powered by -
Certified developers
Trusted Contributor

If you post your code, you may be able to be better helped. In the XML it would be like:


Are you sure you are using the right credentials for the Card Present account?

Powered by -
Certified developers

This is the code I am using, right from the sample code. 


I do not see any marketType here, or any XML - 


Is the marketType and deviceType set in the merchantAuthentication constructor?




  require 'vendor/autoload.php';

  use net\authorize\api\contract\v1 as AnetAPI;
  use net\authorize\api\controller as AnetController;

  define("AUTHORIZENET_LOG_FILE", "phplog");

function authorizeCreditCard($amount)
    /* Create a merchantAuthenticationType object with authentication details
       retrieved from the constants file */
    $merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
    // Set the transaction's refId
    $refId = 'ref' . time();

    // Create the payment data for a credit card
    $creditCard = new AnetAPI\CreditCardType();

    // Add the payment data to a paymentType object
    $paymentOne = new AnetAPI\PaymentType();

    // Create order information
    $order = new AnetAPI\OrderType();
    $order->setDescription("Golf Shirts");

    // Set the customer's Bill To address
    $customerAddress = new AnetAPI\CustomerAddressType();
    $customerAddress->setAddress("14 Main Street");
    $customerAddress->setCity("Pecan Springs");

    // Set the customer's identifying information
    $customerData = new AnetAPI\CustomerDataType();

    // Add values for transaction settings
    $duplicateWindowSetting = new AnetAPI\SettingType();

    // Add some merchant defined fields. These fields won't be stored with the transaction,
    // but will be echoed back in the response.
    $merchantDefinedField1 = new AnetAPI\UserFieldType();

    $merchantDefinedField2 = new AnetAPI\UserFieldType();

    // Create a TransactionRequestType object and add the previous objects to it
    $transactionRequestType = new AnetAPI\TransactionRequestType();

    // Assemble the complete transaction request
    $request = new AnetAPI\CreateTransactionRequest();

    // Create the controller and get the response
    $controller = new AnetController\CreateTransactionController($request);
    $response = $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::SANDBOX);

    if ($response != null) {
        // Check to see if the API request was successfully received and acted upon
        if ($response->getMessages()->getResultCode() == \SampleCode\Constants::RESPONSE_OK) {
            // Since the API request was successful, look for a transaction response
            // and parse it to display the results of authorizing the card
            $tresponse = $response->getTransactionResponse();
            if ($tresponse != null && $tresponse->getMessages() != null) {
                echo " Successfully created transaction with Transaction ID: " . $tresponse->getTransId() . "\n";
                echo " Transaction Response Code: " . $tresponse->getResponseCode() . "\n";
                echo " Message Code: " . $tresponse->getMessages()[0]->getCode() . "\n";
                echo " Auth Code: " . $tresponse->getAuthCode() . "\n";
                echo " Description: " . $tresponse->getMessages()[0]->getDescription() . "\n";
            } else {
                echo "Transaction Failed \n";
                if ($tresponse->getErrors() != null) {
                    echo " Error Code  : " . $tresponse->getErrors()[0]->getErrorCode() . "\n";
                    echo " Error Message : " . $tresponse->getErrors()[0]->getErrorText() . "\n";
            // Or, print errors if the API request wasn't successful
        } else {
            echo "Transaction Failed \n";
            $tresponse = $response->getTransactionResponse();
            if ($tresponse != null && $tresponse->getErrors() != null) {
                echo " Error Code  : " . $tresponse->getErrors()[0]->getErrorCode() . "\n";
                echo " Error Message : " . $tresponse->getErrors()[0]->getErrorText() . "\n";
            } else {
                echo " Error Code  : " . $response->getMessages()->getMessage()[0]->getCode() . "\n";
                echo " Error Message : " . $response->getMessages()->getMessage()[0]->getText() . "\n";
    } else {
        echo  "No response returned \n";

    return $response;

if (!defined('DONT_RUN_SAMPLES')) {


Would a card present account require a different endpoint?


I could not find any information on this, but the endpoint that works fine is from the Sample Code:


const PRODUCTION = "";


Is it different for CP?

I've tried dumping the $controller data:


$response = $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::PRODUCTION);

There is quite a bit of data, but I cannot find anything regarding marketType or deviceType.


Are you posting card track data read from the customer's card?


 If you are posting to a Card Present only account, you may need to be sending the track data instead of the creditCard element.

Powered by -
Certified developers

The retail stores are setup with a different type of api.  It uses curl - the call is like this:


$ch = curl_init(""); 

curl_setopt($ch, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1)
curl_setopt($ch, CURLOPT_POSTFIELDS, rtrim( $fields, "& " )); // use HTTP POST to send form data
### curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // uncomment this line if you get no gateway response. ###
$resp = curl_exec($ch); //execute post and get results
curl_close ($ch);

This can accept the credit card number or the track data.


Is it possible to use the AnetAPI for a Card Present type account?


All of the PHP applications in the SDK use cURL. Example code from the PHP SDK for cardPresent transactions is at:

Powered by -
Certified developers