Table of Contents
Overview
Authentication errors can pose challenges when interacting with the Payment API, often stemming from issues verifying the authenticity of user requests. This article delves into common authentication errors, providing insights and troubleshooting steps to address these issues before reaching out to support.
Understanding Authentication Errors
Authentication errors manifest as a failure in verifying the authenticity of user requests submitted to the Payment API. These errors include:
- Authentication Failed
- User Not Found
- 404 Not Found
- Specified API Key Not Found
For the purpose of this article, the focus will be on authentication-based errors.
Troubleshooting Steps
Authentication errors may have various causes, each requiring specific resolutions. This article guides you through troubleshooting steps for authentication errors to empower integrators to address issues independently.
1. Incorrect or Unsupported Credentials
Authentication errors will occur if invalid or unsupported credentials are used in Payment API requests.
While some integrations may still use username and password authentication, its use is increasingly limited. In many cases, submitting a username and password in an API request will result in an Authentication Failed error. The recommended and preferred authentication method for the Payment API is a Security Key.
Authentication errors related to credentials may be caused by:
- Use of a username and password instead of a Security Key.
- An invalid, inactive, or incorrectly formatted Security Key.
- A Security Key associated with a different Merchant Gateway Account.
- Missing or improper URL encoding in the API request.
To resolve these issues:
- Ensure the request authenticates using a valid Security Key.
- Confirm the Security Key belongs to the correct Merchant Gateway Account.
- Verify the Security Key is passed exactly as generated.
Merchants currently using username and password authentication should plan to migrate to Security Key (API key) authentication. Refer to the Username/Password to Security Key Migration Guide for details on eligibility, timelines, and migration steps.
2. IP Restrictions
Authentication errors can stem from IP restrictions enabled through the Merchant Gateway Account. To address this:
- Check IP Restriction settings in the Merchant Gateway Account.
- Allow any IP addresses submitting Payment API requests.
- Confirm whether the IP being used is allowed within the Merchant's Gateway Account.
3. Confirming the API Endpoint
Submitting API requests to the incorrect endpoint can result in authentication errors. To resolve:
- Submit a POST request to the proper API endpoint.
- Log in to the Merchant's Gateway Account, go to Help, and select Integration Portal.
- Navigate to the Payment API documentation to confirm and correct the appropriate endpoint.
Conclusion
Authentication errors, while common, can be effectively addressed through systematic troubleshooting. By understanding the potential causes and following the recommended steps, integrators can resolve issues independently, ensuring a smooth and secure interaction with the Payment API. Before reaching out to support, consider these troubleshooting steps to streamline the resolution process.