0

I changed the APIkey for processing payment with Authorize.Net and I updated the .env file but still no luck. I'm getting this error below. I was told that if the login id, and transaction key are correct this shouldn't happen but I've triple check both.

Error

net\authorize\api\contract\v1\MessagesType\MessageAType {#890
      -code: "E00007"
      -text: "User authentication failed due to invalid authentication values."
    }
  ]
}
2
  • The question should be updated to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem.
    – miken32
    Nov 30, 2020 at 16:17
  • Hey Miken, I updated description. hope this helps. Dec 1, 2020 at 12:25

1 Answer 1

1

This comes up frequently and the reasons are always the same:

  1. You are using your production credentials but hitting the sandbox endpoints
  2. You are using your sandbox credentials but are hitting the production endpoints
  3. The credentials you are using are incorrect

Verifying which API endpoint URL you are actually hitting.

If you are testing against the production environment, verify that the URL you have in your code is the actual production URL (or if you are using a framework, the configuration is set to production).

The correct URL for production is https://api2.authorize.net/xml/v1/request.api.

The correct URL for testing is https://apitest.authorize.net/xml/v1/request.api

Verify your all of your credentials are correct

If you are sure that you are hitting the correct endpoint you then need to verify that you are using the correct credentials for that environment.

  • Make sure you are using the API login and transaction key and not the console login and password. They are not the same thing. Only the API login and transaction key will work when accessing the APIs. You can get these after logging in to the console.
  • Double check that the API login is correct in the console.
  • If the API login is correct, from within the customer console generate a new transaction key to verify that you have the correct one.
  • Make sure that the credentials are not accidentally entered incorrectly in your code. Make sure all of the characters are there. Also, the credentials are case sensitive. Make sure you did not capitalize or lowercase those values.
  • If you need to verify your login credentials work set up a MVCE that hits the endpoint you are trying to reach with your API credentials. It should be a simple script that makes a basic API call. This will make it easy to debug why you are getting this error.

Test mode is not the sandbox

It is common to confuse test mode with the sandbox environment. Test mode in production uses the production environment and production credentials. Using the sandbox credentials or URLs will not work.

2
  • Hi John, I really appreciate the help. So there is a third party library in use for payments. In production it uses api2.authorize.net as the base url. I verified with Authorize.net support that i am using a production login and transaction key and payment process worked fine up until the change of the api key roughly 2 weeks ago. This is a Laravel framework project and am using packagist.org/packages/authorizenet/authorizenet package version 1.9.9 to connect with authorize.net. hopefully this helps. Dec 1, 2020 at 22:56
  • Hey John, Are doing more research on the authorizenet/authorizenet package that was used in the project. I believe that the package itself is broken. I don't know if there is anything else i can do regarding it. May have happened when set up the project locally and pushed to server. Dec 1, 2020 at 23:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.