Reply
Highlighted
Member
Posts: 8
Registered: ‎05-28-2016

getSettledBatchList error 400 Bad Request

I'm using a https POST request with SOAP to call the getSettledBatchList service. I'm getting back a Bad Request 400 response. Why? Here's the request:

 

<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetSettledBatchList xmlns="https://api.authorize.net/soap/v1/">
<merchantAuthentication>
<name>myusername</name>
<transactionKey>mytranskey</transactionKey>
</merchantAuthentication>
<includeStatistics>true</includeStatistics>
<firstSettlementDate>2016-05-01T00:00:01Z</firstSettlementDate>
<lastSettlementDate>2016-05-31T23:59:59Z</lastSettlementDate>
</getSettledBatchList>
</soap:Body>
</soap:Envelope>

Highlighted
Member
Posts: 8
Registered: ‎05-28-2016

Re: getSettledBatchList error 400 Bad Request

Additional info: I am adding this header:

"content-type" ; "text/xml; charset=utf-8"

Highlighted
Member
Posts: 8
Registered: ‎05-28-2016

Re: getSettledBatchList error 400 Bad Request

More info: Adding a trace resulted in this message: You don't have permission to access "http://api2.authorize.net/soap/v1/Service.asmx" on this server.

 

(I am using the https version of the URL, so I don't know why the error message says http.)

Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: getSettledBatchList error 400 Bad Request

[ Edited ]

error on the trace or the request?

 

400 bad request could be data or the header

 

how are you posting? where are you posting to?

Highlighted
Member
Posts: 8
Registered: ‎05-28-2016

Re: getSettledBatchList error 400 Bad Request

posting to:

https://api2.authorize.net/soap/v1/Service.asmx

 

Sent from a database application (4D) that has an HTTP REQUEST command. I get an abbreviated error when I do the actual request: Error 400 Bad Request. I get the fuller error ("You don't have permission...") when I do the trace.

Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: getSettledBatchList error 400 Bad Request

post to just the asmx or

https://api2.authorize.net/soap/v1/Service.asmx/GetSettledBatchList

or you set the soap action?

Highlighted
Member
Posts: 8
Registered: ‎05-28-2016

Re: getSettledBatchList error 400 Bad Request

just asmx

Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: getSettledBatchList error 400 Bad Request

Highlighted
Member
Posts: 8
Registered: ‎05-28-2016

Re: getSettledBatchList error 400 Bad Request

Tried it. Same result.

Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: getSettledBatchList error 400 Bad Request

[ Edited ]

Can yu try it other then using the 4D database?

or did you try just using the xml interface?

https://developer.authorize.net/api/reference/#transaction-reporting

 

Request Method: POST

Sandbox URL: https://apitest.authorize.net/xml/v1/request.api

Production URL: https://api.authorize.net/xml/v1/request.api

XSD URL: https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd


XML Content-Type: text/xml

JSON Content-Type: application/json