Troubleshooting API Integration

I am calling the API, and I am getting the response "Invalid credentials". What could be happening?

The most common reason for this error is that the Base URL and the Basic Authentication credentials do not correspond to the same environment. To fix this, please check the following:

  1. Check your Base URL as specified here https://xanpay.com/documentation/api/. The base URL should correspond to the environment (sandbox or production) you intend to be working with.
  2. Check your API Client ID and API secret and ensure that these values and the base URL correspond to the same environment (sandbox or production).

 

My integration is set up, but there is no account number for payment.

Account details are not displayed in Sandbox mode. For more details on testing your integration using Sandbox mode, please follow this guide.

 

The link returned by Checkout link API does not work in PHP. Why might that be?

Certain characters have special significance in HTML, and should be represented by HTML entities if they are to preserve their meanings. (Here is an example of this type of issue on Stack Overflow). You need to HTML-encode the '&' character as '&amp'. Send the link received through the htmlspecialchars PHP function described here. This link should work.