cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with ARB XML

I inherited some billing code from another developer and it uses the ARB xml api (v1), my client informed me they where getting duplicate transaction errors so i started researching seeing what i could do about it for them and found where people had said to add the invoiceNumber node to the order node of my xml request, had someone from auth.net tell me to add an x_duplicate_window field to the xml, and a few other random suggestions.

 

Unfortunately nothing i've found and tried seems to work. If i add the order  / invoiceNumber nodes to the xml this thing sends to create the subscription, i get an error like the follow: The element 'subscription' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'order' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd', same when i try x_duplicate_window, etc.. Not really sure how to accomplish what i need to since what all the documentation i can find says doesn't work.

 

Was hoping someone else has had this problem w/ the ARB xml api or just happens to know / has the order -> invoiceNumber nodes working somewhere and can tell me what i'm doing wrong. Included some sample xml that i'm sending to get that error:

 

<?xml version="1.0" encoding="utf-8"?>
<ARBCreateSubscriptionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
	<name>LOGIN</name>
	<transactionKey>APIKEY</transactionKey>
</merchantAuthentication>
<refId>REFID</refId>
<subscription>
	<name>SUBNAME</name>
	<paymentSchedule>
		<interval>
			<length>1</length>
			<unit>month</unit>
		</interval>
		<startDate>2011-12-01</startDate>
		<totalOccurrences>9999</totalOccurrences>
	</paymentSchedule>
	<amount>$amount</amount>
	<payment>
		<creditCard>
			<cardNumber>$ccnum</cardNumber>
			<expirationDate>$mo/$yr</expirationDate>
		</creditCard>
	</payment>
	<billTo>
		<firstName>$firstName</firstName>
		<lastName>$lastName</lastName>
	</billTo>
	<order>
		<invoiceNumber>$invoiceNumber</invoiceNumber>
	</order>
</subscription>
</ARBCreateSubscriptionRequest>

 Please Help and Thanks in advance!

scriptworkz
Member
1 ACCEPTED SOLUTION

Accepted Solutions

Their xml are sequence sensitive. In this case the <order /> need to go between <payment /> and <billTo />. There is no x_duplicate_window that you can set in the ARBCreateSubscriptionRequest because it is a schedule job that run on Authorize.net(not sure about what time). If the invoice# is unique, it should fix the duplicate error.

 

There is documentation on ARB xml http://developer.authorize.net/api/arb/

View solution in original post

RaynorC1emen7
Expert
2 REPLIES 2

Their xml are sequence sensitive. In this case the <order /> need to go between <payment /> and <billTo />. There is no x_duplicate_window that you can set in the ARBCreateSubscriptionRequest because it is a schedule job that run on Authorize.net(not sure about what time). If the invoice# is unique, it should fix the duplicate error.

 

There is documentation on ARB xml http://developer.authorize.net/api/arb/

RaynorC1emen7
Expert

This worked and solved the problem, thank you very much!