cancel
Showing results for 
Search instead for 
Did you mean: 

Sending <retail> as part of transactions

Hello, 

 

We have an integration to Authorize.net XML, using commands such as createTransactionRequest and ARBCreateSubscriptionRequest

 

On this thread: https://community.developer.authorize.net/t5/Integration-and-Testing/Transactions-of-this-market-typ... it suggests it is possible to send additional data such as:

        <retail>
                <marketType>0</marketType>
                <deviceType>8</deviceType>
        <retail>

 

However, I am unable to find confirmation as to where that should be inserted into the XML structure.

 

We're sending messages such as:

<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <merchantAuthentication>
  </merchantAuthentication>
  <refId></refId>
  <transactionRequest>
        <transactionType>authCaptureTransaction</transactionType>
        <amount></amount>
        <profile>
          <customerProfileId></customerProfileId>
          <paymentProfile>
                <paymentProfileId></paymentProfileId>
          </paymentProfile>
        </profile>
        <order>
          <invoiceNumber></invoiceNumber>
          <description></description>
        </order>
        <shipTo>
          <firstName></firstName>
          <lastName></lastName>
          <company></company>
          <address></address>
          <city></city>
          <state></state>
          <zip></zip>
          <country></country>
        </shipTo>
  </transactionRequest>
</createTransactionRequest>

 

 

 

inkeyes
Contributor
1 REPLY 1

Hi inkeyes

 

In the API Reference Guide we highlight some of the fields in the pre-formed JSON and XML examples of a createTransactionRequest, but this does not encompass all possible combinations of fields available.

 

To see all available fields, please expand the Request Field Description found under the pre-formed JSON/XML windows of the createTransactionRequest examples. 

 

I have taken the liberty to add these fields as you have presented them to the pre-formed XML example found in the aforementioned API Reference Guide: 

<?xml version="1.0" encoding="UTF-8"?>
<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
   <merchantAuthentication>
      <name>5KP3u95bQpv</name>
      <transactionKey>346HZ32z3fP4hTG2</transactionKey>
   </merchantAuthentication>
   <refId>123456</refId>
   <transactionRequest>
      <transactionType>authCaptureTransaction</transactionType>
      <amount>5</amount>
      <payment>
         <creditCard>
            <cardNumber>5424000000000015</cardNumber>
            <expirationDate>2020-12</expirationDate>
            <cardCode>999</cardCode>
         </creditCard>
      </payment>
      <order>
         <invoiceNumber>INV-12345</invoiceNumber>
         <description>Product Description</description>
      </order>
      <lineItems>
         <lineItem>
            <itemId>1</itemId>
            <name>vase</name>
            <description>Cannes logo</description>
            <quantity>18</quantity>
            <unitPrice>45.00</unitPrice>
         </lineItem>
      </lineItems>
      <tax>
         <amount>4.26</amount>
         <name>level2 tax name</name>
         <description>level2 tax</description>
      </tax>
      <duty>
         <amount>8.55</amount>
         <name>duty name</name>
         <description>duty description</description>
      </duty>
      <shipping>
         <amount>4.26</amount>
         <name>level2 tax name</name>
         <description>level2 tax</description>
      </shipping>
      <poNumber>456654</poNumber>
      <customer>
         <id>99999456654</id>
      </customer>
      <billTo>
         <firstName>Ellen</firstName>
         <lastName>Johnson</lastName>
         <company>Souveniropolis</company>
         <address>14 Main Street</address>
         <city>Pecan Springs</city>
         <state>TX</state>
         <zip>44628</zip>
         <country>USA</country>
      </billTo>
      <shipTo>
         <firstName>China</firstName>
         <lastName>Bayles</lastName>
         <company>Thyme for Tea</company>
         <address>12 Main Street</address>
         <city>Pecan Springs</city>
         <state>TX</state>
         <zip>44628</zip>
         <country>USA</country>
      </shipTo>
      <customerIP>192.168.1.1</customerIP>
      <retail>
         <marketType>0</marketType>
         <deviceType>8</deviceType>
      </retail>
      <userFields>
         <userField>
            <name>MerchantDefinedFieldName1</name>
            <value>MerchantDefinedFieldValue1</value>
         </userField>
         <userField>
            <name>favorite_color</name>
            <value>blue</value>
         </userField>
      </userFields>
   </transactionRequest>
</createTransactionRequest>

 

I hope this is helpful to you. 

 

Thank you,

Elaine

 

ElaineM
Moderator Moderator
Moderator