Skip to content



    The PHP language is an open source language called server side: this means that, unlike languages such as HTML, CSS or JavaScript that are interpreted first by the browser, the PHP code is executed directly on the web server, where the scripts formulate HTML instructions that are only at the end transmitted to the browser and then to the visitor.


    You can install the Nexi SDK for PHP using the composer command:


    composer require nexigroup/npg-sdkTBD


    Before you can communicate with the gateway, you must create a configuration object that implements the ICONFIGURATION interface.

    Once instantiated, this object can invoke the PAYMENTGATEWAYCLIENT constructor that instantiates the object that handles calls to the gateway.

    Example of use

    Once you have the object indicated in the previous section, you can proceed with requests to the gateway. Below is an example of payment via the Hosted Payment Page mode:

    Objects, as well as "set" methods for setting parameters, are referenced by the POST/orders/hpp API. The SDK has been developed by keeping the parameter names the same as those of the gateway APIs, to facilitate and improve the user experience.