cancel
Showing results for 
Search instead for 
Did you mean: 

API details for the Items xml format for Returns

I created an example for returning an order with the items listed into the Sandbox API Reference tool using my sandbox account. I see the reference return Elements and documentation but I can not seem to get it to work.  So the first quest is simple.  1) can and should I be capable to process a return with the items returned in the tool. 2) I really can't find any details anywhere on the internet on how to return an item and credit a customer's account.   I can do a VOID order and FULL Return minus the items.  (Simple).   But I really would like to include the items in the process of  "Refund a Transaction".   Below is the example that I put together.

 

<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>XXXXXXXXXX</name>
<transactionKey>XXXXXXXXXXXXXX</transactionKey>
</merchantAuthentication>
<refId>8854XX</refId>
<transactionRequest>
<transactionType>refundTransaction</transactionType>
<amount>58.30</amount>
<payment>
<creditCard>
<cardNumber>8888</cardNumber>
<expirationDate>XXXX</expirationDate>
</creditCard>
</payment>
<refTransId>80015474393</refTransId>
<lineItem>
<itemId>25774</itemId>
<name>VARDAR2324NIKEPRECISIONVIJERSE</name>
<quanity>1</quanity>
<unitPrice>55.00</unitPrice>
<taxable>Y</taxable>
</lineItem>
<tax>
<amount>3.30</amount>
<name>MICHIGAN</name>
</tax>
</transactionRequest>
</createTransactionRequest>

 

Error response:

  <messages>
    <resultCode>Error</resultCode>
    <message>
      <code>E00003</code>
      <text>The element 'transactionRequest' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'lineItem' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'splitTenderId, order, lineItems, tax, duty, shipping, taxExempt, poNumber, customer, billTo, shipTo, customerIP, cardholderAuthentication, retail, employeeId, transactionSettings, userFields, surcharge, merchantDescriptor, subMerchant, tip, processingOptions, subsequentAuthInformation, otherTax, shipFrom, authorizationIndicatorType' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.</text>
    </message>
  </messages>
</ErrorResponse>

 

bbolt510
Member
1 ACCEPTED SOLUTION

Accepted Solutions

Fixed it..

<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>xxxxxx</name>
<transactionKey>xxxxxx</transactionKey>
</merchantAuthentication>
<refId>xxxxx</refId>
<transactionRequest>
<transactionType>refundTransaction</transactionType>
<amount>58.30</amount>
<payment>
<creditCard>
<cardNumber>8888</cardNumber>
<expirationDate>XXXX</expirationDate>
</creditCard>
</payment>
<refTransId>80015474393</refTransId>
<lineItems>
<lineItem>
<itemId>25774</itemId>
<name>VARDAR2324NIKEPRECISIONVIJERSE</name>
<quantity>1</quantity>
<unitPrice>55.00</unitPrice>
<taxable>true</taxable>
</lineItem>
</lineItems>
<tax>
<amount>3.30</amount>
<name>michigan</name>
</tax>
</transactionRequest>
</createTransactionRequest>

View solution in original post

bbolt510
Member
1 REPLY 1

Fixed it..

<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>xxxxxx</name>
<transactionKey>xxxxxx</transactionKey>
</merchantAuthentication>
<refId>xxxxx</refId>
<transactionRequest>
<transactionType>refundTransaction</transactionType>
<amount>58.30</amount>
<payment>
<creditCard>
<cardNumber>8888</cardNumber>
<expirationDate>XXXX</expirationDate>
</creditCard>
</payment>
<refTransId>80015474393</refTransId>
<lineItems>
<lineItem>
<itemId>25774</itemId>
<name>VARDAR2324NIKEPRECISIONVIJERSE</name>
<quantity>1</quantity>
<unitPrice>55.00</unitPrice>
<taxable>true</taxable>
</lineItem>
</lineItems>
<tax>
<amount>3.30</amount>
<name>michigan</name>
</tax>
</transactionRequest>
</createTransactionRequest>

bbolt510
Member