Generating a payment form

To generate a payment request, you must create an HTML form as follows:
<form method="POST" action="https://secure.payzen.eu/vads-payment/">
	<input type="hidden" name="parameter1" value="value1" />
	<input type="hidden" name="parameter2" value="value2" />
	<input type="hidden" name="parameter3" value="value3" />
	<input type="hidden" name="signature" value="signature"/>
	<input type="submit" name="pay" value="Pay"/>
	</form>

It contains:

The following technical elements:

  • The <form> and </form> tags that allow to create an HTML form.
  • The method="POST" attribute that defines the method used for sending data.
  • The action="https://secure.payzen.eu/vads-payment/" attribute that defines where to send the form data.

Form data:

  • The shop ID.
  • Information about the payment depending on the use case (see the chapters below).
  • Additional information, depending on your requirements (see Using additional features).
  • Signature that certifies the integrity of the form (see Computing the signature).

This data is added to the form by using the <input> tag:

<input type="hidden" name="parameter1" value="value1" />

For setting the name and value attributes, see chapter Data dictionary.

All the data in the form must be encoded in UTF-8.

Special characters (accents, punctuation marks, etc.) will then be correctly interpreted by the payment gateway. Otherwise, the signature will not be computed correctly and the form will be rejected.

The Pay button that will allow to send data:

<input type="submit" name="pay" value="Pay"/>

Different use cases are presented in the chapters below. They will allow you to adapt your payment form to your needs.

The fields required to implement these use cases are presented in tables that indicate the required format (see the encoding below)

Notation Description
a Alphabetic characters (from ‘A’ to ‘Z’ and from ‘a’ to ‘z’)
n Numeric characters
s Special characters
an Alphanumeric characters
ans Alphanumeric and special characters (except ‘<’ and ‘>’)
3 Fixed length of 3 characters
..12 Variable length up to 12 characters
json JavaScript Object Notation.

Object containing key/value pairs separated by commas.

It starts with a left brace ‘ { ’ and ends with a right brace ‘ }’.

Each key / value pair contains the name of the key between double-quotes followed by “ : ”, followed by a value.

The name of the key must be alphanumeric.

The value can be:
  • a chain of characters (in this case it must be framed by double-quotes)
  • a number
  • an object
  • a table
  • a boolean
  • empty
Example: {"name1":45,"name2":"value2", "name3"=false}
enum

Characterizes a field with a complete list of values.

The list of possible values ​​is given in the field definition.

Enum list List of values ​​separated by a “ ; ”.

The list of possible values ​​is given in the field definition.

Example: vads_payment_cards=VISA;MASTERCARD

map List of key / value pair ​​separated by a “;”.

Each key / value pair contains the name of the key followed by “=”, followed by a value.

The value can be:
  • a chain of characters
  • a boolean
  • a json object
  • an xml object

The list of possible values ​​​​for each key/value pair is provided in the field definition.

Example: vads_theme_config=SIMPLIFIED_DISPLAY=true;RESPONSIVE_MODEL=Model_1