Showing results for 
Search instead for 
Did you mean: 

PHP API integration displays an ERROR CODE 500


I am new to and I am stuck with using the API to authorize a card.

The documentation provided is vague. It ask to use the sample php code and that's it.
Can some one please explain the directory structure.


For now, I have added the authorize credit card code snippet into a php with my sandbox credentials and hosted it on the server.


It uses couple of namespaces so had to add the lib folder which I extracted from the sdk.


When I try to execute the php from my page onclick button, I get a 500 Error.


Since the API method did not work, I tried using the SDK for the integration, I uploaded the SDK to my server and executed the sample-code-php/PaymentTransactions/charge-credit-card.php by just providing my api id and transaction key, but I get the same error.


For some reason the USE command for the namespaces shows error though I have it in the lib folder


Can someone please help me with the steps I need to follow to setup the php and be able to execute it from my webpage?



Thanks in advance...



Hi keshavnaik,


You need to make sure to install the SDK. Our SDK is designed to be loaded using composer which automatically also downloads other dependencies such as the serializer. Please make sure you are using composer or those dependencies will be failing. Please note that you can integrate directly with our XML without using the SDK if you prefer, you are not required to use our SDK to integrate with us.




Administrator Administrator

Thanks for the reply Joy...


I would like to be able to invoke the api without the sdk.

Canyou help me with the endpoint URL and the format of the xml for the http request.

are there any other request parameters I need to provide?


Is there any explaination about this method on the Authorie API Reference guide?




Keshav Naik

Hello @keshavnaik


The API Reference provides both the sandbox and production endpoints (check under authentication), as well as detailed XML/JSON request and response formats for all of our API Methods.



I am trying to configure the sdk on another server to get the API working but I get the same 500 error there too...


Can it be that the server is not able to handle the php version which the sdk is working with?


Which version of the SDK are you using?

I am trying with sdk-php-1.9.0