Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Contributor
Posts: 41
Registered: ‎09-30-2011
Accepted Solution

Help with ARB XML

I keep getting an error on this XML that is sent.  Note: I have written "*" where some data goes I do not wish to share.  Thank you for any help!

 

ERROR:

<?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 'subscription' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'customer' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'shipTo' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.</text>
    </message>
  </messages>
</ErrorResponse>



 

XML SENT:

<?xml version="1.0"?>
<ARBCreateSubscriptionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <merchantAuthentication>
    <name>47V4Uej6</name>
    <transactionKey>95r933WDW6mb75fQ</transactionKey>
  </merchantAuthentication>
  <refId>7</refId>
  <subscription>
    <name>****</name>
    <paymentSchedule>
      <interval>
        <length>1</length>
        <unit>months</unit>
      </interval>
      <startDate>2012-01-23</startDate>
      <totalOccurrences>9999</totalOccurrences>
    </paymentSchedule>
    <amount>12.99</amount>
    <payment>
      <creditCard>
        <cardNumber>4111111111111111</cardNumber>
        <expirationDate>122016</expirationDate>
      </creditCard>
    </payment>
    <billTo>
      <firstName>****</firstName>
      <lastName>****</lastName>
    </billTo>
    <customer>
      <id>7</id>
      <email>****</email>
    </customer>
  </subscription>
</ARBCreateSubscriptionRequest>

Accepted Solutions
Solution
Accepted by topic author Wstar
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Help with ARB XML

Sequence matter, <customer /> should be before <billTo />

View solution in original post


All Replies
Solution
Accepted by topic author Wstar
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Help with ARB XML

Sequence matter, <customer /> should be before <billTo />

Contributor
Posts: 41
Registered: ‎09-30-2011

Re: Help with ARB XML

Ah, yes.

 

Thank you sir!