Testing Authorize.NET Credentials with cURL

Published: July 18, 2019


Recently, a client supplied me with Authorize.NET to configure a custom application. When I plugged them in I received the following error:

E00007: User authentication failed due to invalid authentication values.

I needed to get back to them that the credentials weren’t working, but wanted to provide evidence that the error wasn’t due to a coding error in the custom application.

Some quick research brought me to the authenticateTestRequest function.

Credentials can be tested with cURL using this function as follows:

curl https://api.authorize.net/xml/v1/request.api -d '
  "authenticateTestRequest": {
    "merchantAuthentication": {
      "name": "API-LOGIN-ID",
      "transactionKey": "TRANSACTION-KEY"  

Update API-LOGIN-ID and TRANSACTION-KEY as needed.

For sandbox testing switch the URL to https://apitest.authorize.net/xml/v1/request.api.

Max Chadwick Hi, I'm Max!

I'm a software developer who mainly works in PHP, but also dabbles in Ruby and Go. Technical topics that interest me are monitoring, security and performance.

During the day I solve challenging technical problems at Something Digital where I mainly work with the Magento platform. I also blog about tech, work on open source and hunt for bugs.

If you'd like to get in touch with me the best way is on Twitter.