Reply
Member
Posts: 1
Registered: ‎12-16-2009

CIM createCustomerProfileTransactionRequest lineitem usage

I am using CIM to upload a new transaction.  I would like to use the field "lineitem" described in the documentation yet I am not sure where exactly to put it.  Can you help me figure out the order and structure for createCustomerProfileTransactionRequest?  Following is the request and response:

 

<?xml version="1.0"?>
<createCustomerProfileTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <merchantAuthentication>
    <name>fake</name>
    <transactionKey>fake</transactionKey>
  </merchantAuthentication>
  <transaction>
    <profileTransAuthCapture>
      <amount>5.75</amount>
      <customerProfileId>1234</customerProfileId>
      <customerPaymentProfileId>1234</customerPaymentProfileId>
      <order>
        <invoiceNumber>1819</invoiceNumber>
        <description>2 Give Hope: Rescuing Women from Poverty and Exploitation</description>
      </order>
      <lineitem>
        <name>Give Hope</name>
        <quantity>5.0</quantity>
      </lineitem>
      <lineitem>
        <name>GiveChange donation</name>
        <quantity>0.75</quantity>
      </lineitem>
      <taxExempt>true</taxExempt>
      <recurringBilling>false</recurringBilling>
    </profileTransAuthCapture>
  </transaction>
</createCustomerProfileTransactionRequest>

<?xml version="1.0" encoding="utf-8"?><ErrorResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><messages><resultCode>Error</resultCode><message><code>E00003</code><text>The element 'profileTransAuthCapture' 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: 'taxExempt, recurringBilling, cardCode' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.</text></message></messages></ErrorResponse>

 

Trusted Contributor
Posts: 165
Registered: ‎09-09-2009

Re: CIM createCustomerProfileTransactionRequest lineitem usage

I don't have the time to delve in to this at the moment, but I can point you to a tool I wrote for dealing with exactly these kinds of issues.  Basically, it is a single page with two panes (textarea elements), split top and bottom.  In the top you can enter raw XML, then you click the "Post request to Authorize.net" button and it submits the XML and shows the raw response XML in the bottom pane.  It also has a drop-down to auto-paste in templates for all of the ARB and CIM calls that you can fill in the details on.

 

You can find it here:  https://www.itdevworks.com/tools/AuthnetXmlApiTester/AnetXmlApiTester.asp


Dave Parker
IT DevWorks, LLC
Makers of the I-Bill IT libraries for Authorize.net
Blog: http://www.itdaveworks.com
Twitter: http://twitter.com/rayrad
Site: http://www.itdevworks.com
Member
Posts: 1
Registered: ‎03-29-2012

Re: CIM createCustomerProfileTransactionRequest lineitem usage

I know this post is over 2 years old, but it comes up near the top of the search results when googling this error message.

 

For future reference, the error is actually caused by having your customerProfileId and customerPaymentProfileId before your lineItems. Move those 2 items to after the lineItems (and for the rest of the fields, make sure your order matches the order the items are listed in the documentation.

Member
Posts: 1
Registered: ‎05-23-2013

Re: CIM createCustomerProfileTransactionRequest lineitem usage

[ Edited ]

I recently came across error as well. For me, it was caused by having too many line items in a single transaction. Be advised, no more than 30 line items can appear in a single transaction.