Showing results for 
Search instead for 
Did you mean: 

API - XML in Live Production - Not in SandBox

I have a very basic bit of code to create a customer profile shown below for a successful CC transaction . . .


<?xml version="1.0" encoding="utf-8"?>
<createCustomerProfileFromTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">


So in the sandbox this works 100% of the time all the time.


I move into the Authorize.Net live and the code above fails 100%.  I get no error back and my Post goes through with no errors.  My Get returns to me with no error, but the returned XML string from my Get is empty.


I have tried this on my development computer, my Win 2012 R2 server and 3 other computers belonging to clients I support and get the same result.


Is the XML - API "non-soap" for CIM even working in the production API system?

If so why would the same code work 100% of the time in the sandbox, yet fail 100% of the time in the live Authorize.Net system?


I am at a loss to understand what is going on.  I have put in 2 tickets into Authorize.Net, one now over 1 week ago and have received no reply . . . . so I am really roadblocked here!


Any words of wisdom would be appreicated.


Frustrated Pete - lol


Hello @psass


If you can provide the ticket number for your support request, I can escalate this for you. 



Administrator Administrator



I get no ticket number on the support input screen and only get the following message . . .

Your question has been submitted and a member of our integration team will respond within 2-3 business days.

You may also wish to review these developer community threads related to your question.



I assumed I would get possibly and email back with a reference # on it, but none have come.  I resubmitted the ticket again today as maybe my request went into limbo?  I checked my email junk box to mark sure nothing ended up in it.


ps... Everything else is working in sandbox.  Process a CC and the transaction goes through and I obtain the Auth code and TransID from the successful CC payment.  Run the code below in the sandbox and the customer profile in the (CIM) is created and all is 100%.  Running a batch run in the sandbox and yes 100 CIM profiles are created as they should be.  Here my Get returns the XML string with my CIM token numbers and I store them and all is well.  Processing now using the token number and CC transaction works as expected in my sandbox account.


Take same code and ru it in the Authorize.Net LIVE CC processing and the Credit card works 100% and I get back the Authorization Code and the Transaction ID.  I then run exactly the same the same code as shown in previous thread and my XML string return is empty, just an empty string . . . . not a null string . . . a blank string.

I get no errors coming back at me although I have error trapped every line of code involved with Post and Get.





Hello @psass


Since this is your production account, you'll need to create a ticket by contacting Customer Support by phone, or by submitting a eTicket.  Once I have that reference number, I can escalate.



Hi Richard,


Can you at least tell me if I should be able to run XML in CIM production?


I run the above code to 

and it works.


I run the above code to and here if fails with not XML return.


You see I do not have a production account I am an integration developer working for several software houses in the US.   The client's who have a accouting billing system have their credit card processing I wrote a few years ago and the CIM is using soap and currently is targeting . . .   (for test)

and . . .   (for production)


As you are aware we have drop dead date for CIM soap of March 1st 2018 and I am modifying the code to now move all CIM to . . . the https request.api URL's


Now the clients do not want to share their production Authorize.Net credentials and I find the CIM soap version currently works in production, but dows not work in the sandbox.

Flip things around and the XML-API version works in the sandbox, but not in the current production environment.

So my problem is how do I test for the XML-API production prior to March 1st of 2018?


Nobody seems to be able to tell me if the CIM using XML-API targeting

should be failing as a normal thing right now?


I am trying to clarifly this and want to know if on the drop dead date of soap being removed for CIM if you have 100 customers and cannot pre-test are we stuck tring to change code for all offices the night of March 1st 2018 and simply by faith know things will work???








Hello @psass


Yes, the endpoint is live in production today and your application should be able to connect and process if you have production credentials.  If you attempt a transaction using sandbox credentials, it should return an error informing you that your API Login/Transaction Key are not correct.


From what you are saying, if you attempt using sandbox credentials, there is no gateway response?







Hi again Richard,


Let me get more specific.   I am talking only the CIM that the production error is happening on and the creation of a customer profile backed up an successful Credit Card payment returning a valid CC Transaction ID.


If I run everything in the sandbox everythink works perfectly including the creation of the customer profile and the 2 token numbers are returned.  This is bullet proof and runs perfectly in the sandbox.


I then move the code to a clients server that does have a production login credentials and are and have been using for over 3 years and existing XML using soap works 100% and generated the CC transaction and then correctly creates the customer profile in the CIM.


I have a flag set that will swap in and our the XML-soap targeting . . .



. . . so now I can swap out of the code logic to the old https service.asmx and the soap code

and swap in

. . . the code logic to and the new API_XML code.





1.  In production (with the clients production credentails), run the soap logic and the CIM is created successfully all the time.

2.  In production (with production credentails) run the API-XML logic for the customer creation and in the CIM the creation of the customer fails all the time.

3.  Take the same code exactly to create a customers profile (with sandbox credentails) and run in the sandbox "any sandbox", the same API-XML code that failed in production with production keys works as expected in the sandbox with sandbox credentails.


Below is the SOAP code snippet working in production now that works perfectly . . .

                <?xml version="1.0" encoding="UTF-8"?>
                <soapenv:Envelope xmlns:v1=""


Below is the API-XML code that works in the sandbox with sandbox credentials, but fails in production with the clients production credentails.  This fails consistently all the time, 100% of the time in production.


                <?xml version="1.0" encoding="utf-8"?>
                <createCustomerProfileFromTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">


So really what I am after here is there some reason that my API-XML code should be failing in production when the same code works 100 in the sandbox and I am using the correct production credentials as the same credentials in production can process a credit card payment, refund, etc.


Now the application is a desktop appliction C++ and the code in the module to set this up goes like this . . .

the lohttp object is created in code just prior and is a http object class.  You will note below I an using the C++ Try . . Catch.. EndTry error trapping wrapper so if any part of the POST or GET opertion should fail I will get a messagebox popup to advise that an error was wncountered.  I get no errors at all.


               lcXMLstring = ""    && Ensure the XML string is blank.
                TEXT TO lcXMLstring NOSHOW TEXTMERGE
                <?xml version="1.0" encoding="utf-8"?>
                <createCustomerProfileFromTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">

                * --- 1) Tell the object being posted is an XML file.
                    loHttp.nHttpPostMode = 4      
                CATCH TO oException
                    = MESSAGEBOX("HTTP Post Mode setting failure!",0+16,"Authorize.Net - Post Mode Setting Error")

                * --- 2) Add the XML to the Object.
                * - = MESSAGEBOX("Next up add in the XML value as a Post Key!")
                CATCH TO oException
                    = MESSAGEBOX("HTTP Add Post Key failure!",0+16,"Authorize.Net - Add XML Error")

                * --- 3) Sends the XML file to Authorize.Net and await a return response.
                * - = MESSAGEBOX("Next up GET the Authorize.Net posting return value in a XML string!")
                    gcXMLPOSTReturn = loHTTP.HTTPGet(lcXMLURL)
                CATCH TO oException
                       = MESSAGEBOX("HTTP Get failure!",0+16,"Authorize.Net - Get XML Error")    


What I should get at the end of all of this in the memory variable gcXMLPOSTReturn would be an XML string return wth the Customer profile token numbers and a successful indication.

I do get the correct XMP return string in the sandbox, but in production the returned XML string is empty.  I get no error code and each part of my POST and GET code above works and no error sensed in the code snippet.


With no error happening and no error returning I do not know what next to look at to resolve the problem only happening in production. 



Hi Pete,


Can you back up a layer and capture the actual network traffic (using Wireshark or similar)? You want to verify that the request is indeed going to the right endpoint, and you want to see if there's any response at all from the destination (like an HTTP status code or HTTP response headers).


There's no reason that what you're doing shouldn't work. Everything you're doing is 100% supported. The only way I can think of for it to fail would be if in the process of switching the endpoint from sandbox to production (or from soap to xml) your code is mangling the endpoint or the request in some way. Capturing the whole request/response from outside your code would make that visible right away.

Cannot use CreateCustomerProfileFromTransaction in my project.  4 different clients and fails 100% of the time for all production (CIM) creations.


Same project, same clients with same production authentication . .  createCustomerProfileRequest works 100% of the time.


Change my code to call createCustomerProfileRequest and everything in both sandbox and production works as expected.


My fix was to stop useing the API CreateCustomerProfileFromTransaction call.