Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Example of Python code using PayZen SOAP V5 webservices - createPayment request


The code presented here is a demonstration of the implementation of the SOAP v5 PayZen webservices, aimed to ease its use and learning.

This code only supports the createPayment request, but shows how a PayZen request and its answer can be handled.

The SOAP backend used here is SUDS, you may need to install it into your system. Please consult for detailled install instructions


This code is divided in two parts:

  •, the main file, entry point of the process
  •, the core file, defining an utility class encapsulating all the PayZen logics

The first use

  1. Place the files on the same directory
  2. In, replace the occurences of [***CHANGE-ME***] by the actual values of your PayZen account
  3. Execute: > python to perform the createPayment request, in "TEST" mode.

The next steps

You can follow the on-file documentation in payzen.soap-v5.createPayment.example.php to change the properties of the payment you want to initiate, like the amount or the informations of the customer payment card.

You can also change the TEST parameter to PRODUCTION to switch to real payment mode, with all the caution this decision expects.