• No results found

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:

• Shop ID,

• Information about the payment depending on the use case (see the chapters below),

Additional information, depending on your requirements (see chapter Using additional functions ),

Signature that certifies the integrity of the form (see chapter 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.

• Creating an immediate payment.

• Creating a deferred payment.

• Creating an installment payment.

• Creating an authorization without capture

7.1. Creating an immediate payment

In the immediate payment mode the buyer pays the total amount for the purchase at once.

The payment is captured by the bank the same day.

1. Use all the fields of the table below to create your payment form.

Field name Description Value

vads_site_id Shop ID Eg.: 12345678

vads_ctx_mode Operating mode TEST or PRODUCTION

vads_trans_id Transaction number Eg.: 123456

vads_trans_date Date and time of the payment form in UTC format Eg.: 20140129130025 vads_amount Payment amount (in the smallest currency unit) Eg.: 3000 for 30 euros

vads_currency Code of the payment currency Eg.: 978 for euro

vads_action_mode Acquisition mode for credit card data INTERACTIVE

vads_page_action Action to perform PAYMENT

vads_version Version of the exchange protocol V2

vads_payment_config Payment type SINGLE

vads_capture_delay Delay before capture by the bank 0

vads_validation_mode Validation mode 0 (Automatic)

Table 4: Field list - Immediate payment

2. Set vads_payment_config to SINGLE.

3. Set vads_capture_delay to 0.

4. Set vads_validation_mode to 0 for automatic validation (the payment will be automatically captured by the bank).

5. Fill in the vads_currency field with the code of the desired currency using the currency table (example: 978 for Euro; 840 for US dollar).

6. Add optional fields depending on your requirements (see chapter Using additional functions).

7. Compute the value of the signature field using all the fields of your form starting with vads_ (see chapter Computing the signature).

Example of a form for an immediate payment:

<form method="POST" action="https://secure.payzen.eu/vads-payment/">

<input type="hidden" name="vads_action_mode" value="INTERACTIVE" />

<input type="hidden" name="vads_amount" value="3000" />

<input type="hidden" name="vads_capture_delay" value="0" />

<input type="hidden" name="vads_ctx_mode" value="TEST" />

<input type="hidden" name="vads_currency" value="978" />

<input type="hidden" name="vads_page_action" value="PAYMENT" />

<input type="hidden" name="vads_payment_config" value="SINGLE" />

<input type="hidden" name="vads_site_id" value="12345678" />

<input type="hidden" name="vads_trans_date" value="20140526101407" />

<input type="hidden" name="vads_trans_id" value="239848" />

<input type="hidden" name="vads_version" value="V2" />

<input type="hidden" name="signature" value="86b2a17b9a5fcefb6c0120c57b25ec86ad1704ee"/>

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

</form>

7.2. Creating a deferred payment

The amount of a deferred payment is withdrawn once, the delay for its capture by the bank is strictly greater than 0 days.

• An authorization request will be made for the total amount if the capture delay is shorter or equal to the validity period of an authorization request (see table).

• An authorization request for 1 €will be made if the capture delay is greater than the validity period of an authorization request (see table).

An authorization request for the total amount will be made one day before the capture date.

1. Use all the fields of the table below to create your payment form.

Field name Description Value

vads_site_id Shop ID Eg.: 12345678

vads_ctx_mode Operating mode TEST or PRODUCTION

vads_trans_id Transaction number Eg.: 123456

vads_trans_date Date and time of the payment form in UTC format Eg.: 20140129130025 vads_amount Payment amount (in the smallest currency unit) Eg.: 3000 for 30 Euros

vads_currency Code of the payment currency Eg.: 978 for euro

vads_action_mode Acquisition mode for credit card data INTERACTIVE

vads_page_action Action to perform PAYMENT

vads_version Version of the exchange protocol V2

vads_payment_config Payment type SINGLE

vads_capture_delay Delay before capture by the bank >0 Example: 3

vads_validation_mode Validation mode 0 (automatic) or 1 (manual)

Table 5: Field list - Deferred payment

2. Set vads_payment_config to SINGLE.

3. Set vads_capture_delay to a value greater than 0.

4. Set vads_validation_mode to 0 for an automatic validation (the payment will be automatically captured by the bank) or to 1 for a manual validation (the payment will be captured by the bank after a manual validation in the Back Office).

5. Fill in the vads_currency field with the code of the desired currency using the currency table (example: 978 for Euro; 840 for US dollar).

6. Add optional fields according to your requirements (see chapter Using additional functions).

7. Compute the value of the signature field using all the fields of your form starting with vads_ (see chapter Computing the signature).

Example of a form for a deferred payment:

<form method="POST" action="https://secure.payzen.eu/vads-payment/">

<input type="hidden" name="vads_action_mode" value="INTERACTIVE" />

<input type="hidden" name="vads_amount" value="3000" />

<input type="hidden" name="vads_capture_delay" value="3" />

<input type="hidden" name="vads_ctx_mode" value="TEST" />

<input type="hidden" name="vads_currency" value="978" />

<input type="hidden" name="vads_page_action" value="PAYMENT" />

<input type="hidden" name="vads_payment_config" value="SINGLE" />

<input type="hidden" name="vads_site_id" value="12345678" />

<input type="hidden" name="vads_trans_date" value="20140129130025" />

<input type="hidden" name="vads_trans_id" value="130025" />

<input type="hidden" name="vads_version" value="V2" />

<input type="hidden" name="signature" value="86b2a17b9a5fcefb6c0120c57b25ec86ad1704ee"/>

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

</form>

7.3. Creating an installment payment

This payment mode allows the merchant to make the payment process easier for the buyer.

The payment form defines the number of installments and the interval between them.

The first installment is similar to the immediate payment.

The next installment is similar to a defered payment.

Note:

Notifications rules have to be activated according the installment. See chapter Setting up notifications for more information.

Precisions :

On the payment day, the merchant is not credited with the total amount and the payment guarantee cannot apply to the future installments.

The date of the last installment cannot be later than one year after the date of the submission of the form.

If it is, an error message will appear and the form will be rejected.

1. Use all the fields below to create your payment form.

Field name Description Value

vads_site_id Shop ID Eg.: 12345678

vads_ctx_mode Operating mode TEST or PRODUCTION

vads_trans_id Transaction number Eg.: 123456

vads_trans_date Date and time of the payment form in UTC format Eg.: 20140129130025 vads_amount Payment amount (in the smallest currency unit) Eg.: 3000 for 30 euros

vads_currency Code of the payment currency Eg.: 978 for euro

vads_action_mode Acquisition mode for credit card data INTERACTIVE

vads_page_action Action to perform PAYMENT

vads_version Version of the exchange protocol V2

vads_payment_config Payment type see step 2.

vads_capture_delay Delay before capture by the bank 0

vads_validation_mode Validation mode 0 (automatic) or 1 (manual)

Table 6: Field list - Installment payment

2. Set the value of the vads_payment_config field using the following syntax:

• Fixed payment amounts and dates:

MULTI:first=1000;count=3; period=30 where:

"first" is the amount (in the smallest currency unit) of the first installment processed on the day of payment,

"count" is the total number of installments,

"period" defines the period (in days) between each installment.

• Customized payment amounts and dates:

MULTI_EXT:date1=amount1;date2=amount2;date3=amount3 where:

date1=amount1 defines the date and the amount of the first installment.

The amounts are presented in the smallest currency unit. The total amount must be equal to the value of the vads_amount field.

The dates are presented in the YYYYMMDD format.

3. Set vads_capture_delay to 0. The first payment will be captured by the bank on the same day.

4. Set vads_validation_mode to 0 for an automatic validation (the payment will be automatically captured by the bank) or to 1 for a manual validation (manual operation made from the Back Office).

The validation mode is applied to each installment payment.

5. Fill in the vads_currency field with the code of the desired currency using the currency table (example: 978 for Euro; 840 for US dollar).

6. Add optional fields according to your requirements (see chapter Using additional functions).

7. Compute the value of the signature field using all the fields of your form starting with vads_ (see chapter Computing the signature).

Example of a payment form for an installment payment (fixed amounts and payment dates):

<form method="POST" action="https://secure.payzen.eu/vads-payment/">

<input type="hidden" name="vads_action_mode" value="INTERACTIVE" />

<input type="hidden" name="vads_amount" value="3000" />

<input type="hidden" name="vads_ctx_mode" value="TEST" />

<input type="hidden" name="vads_currency" value="978" />

<input type="hidden" name="vads_page_action" value="PAYMENT" />

<input type="hidden" name="vads_payment_config" value="MULTI:first=1000;count=3;period=30"/>

<input type="hidden" name="vads_site_id" value="12345678" />

<input type="hidden" name="vads_trans_date" value="20140129180150" />

<input type="hidden" name="vads_trans_id" value="180150" />

<input type="hidden" name="vads_version" value="V2" />

<input type="hidden" name="signature" value= "180b93e173b16d90b47099482ce9ed05325b33bb"/>

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

</form>

Example of a payment form for an installment payment (customized amounts and payment dates):

<form method="POST" action="https://secure.payzen.eu/vads-payment/">

<input type="hidden" name="vads_action_mode" value="INTERACTIVE" />

<input type="hidden" name="vads_amount" value="3000" />

<input type="hidden" name="vads_capture_delay" value="0" />

<input type="hidden" name="vads_ctx_mode" value="TEST" />

<input type="hidden" name="vads_currency" value="978" />

<input type="hidden" name="vads_page_action" value="PAYMENT" />

<input type="hidden" name="vads_payment_config" value="

MULTI_EXT:20140201=1000;20140301=1000;20140401=1000" />

<input type="hidden" name="vads_site_id" value="12345678" />

<input type="hidden" name="vads_trans_date" value="20140129130025" />

<input type="hidden" name="vads_trans_id" value="130025" />

<input type="hidden" name="vads_version" value="V2" />

<input type="hidden" name="signature" value="86b2a17b9a5fcefb6c0120c57b25ec86ad1704ee"/>

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

</form>

7.4. Creating an authorization without capture

This payment mode allows to verify that the buyer's card data is correct without debiting it.

If needed, the merchant will be able to debit the card with the desired amount by using the Duplicate function of the Back Office. To do so:

• the manual validation mode must be used,

• the merchant must not validate transactions manually.

1. Use all the fields of the table below to create your payment form.

Field name Description Value

vads_site_id Shop ID Eg.: 12345678

vads_ctx_mode Operating mode TEST or PRODUCTION

vads_trans_id Transaction number Eg.: 123456

vads_trans_date Date and time of the payment form in UTC format Eg.: 20140129130025 vads_amount Payment amount (in the smallest currency unit) 100 (for 1 euro)

vads_currency Code of the payment currency Eg.: 978 for euro

vads_action_mode Acquisition mode for credit card data INTERACTIVE

vads_page_action Action to perform PAYMENT

vads_version Version of the exchange protocol V2

vads_payment_config Payment type SINGLE

vads_capture_delay Delay before capture by the bank 0

vads_validation_mode Payment validation mode 1

Table 7: Field list - Authorization without a capture

2. Set the value of the vads_amount field to a small amount. It will not affect the authorization limit of the card.

3. Set vads_validation_mode to 1.

4. Fill in the vads_currency field with the code of the desired currency using the currency table (example: 978 for Euro; 840 for US dollar).

5. Add optional fields according to your requirements (see chapter Using additional functions).

6. Compute the value of the signature field using all the fields of your form starting with vads_ (see chapter Computing the signature).

Example of a payment form for an authorization without a capture:

<form method="POST" action="https://secure.payzen.eu/vads-payment/">

<input type="hidden" name="vads_action_mode" value="INTERACTIVE" />

<input type="hidden" name="vads_amount" value="100" />

<input type="hidden" name="vads_capture_delay" value="0" />

<input type="hidden" name="vads_ctx_mode" value="TEST" />

<input type="hidden" name="vads_currency" value="978" />

<input type="hidden" name="vads_page_action" value="PAYMENT" />

<input type="hidden" name="vads_validation_mode" value="1"/>

<input type="hidden" name="vads_site_id" value="12345678" />

<input type="hidden" name="vads_trans_date" value="20141008073753" />

<input type="hidden" name="vads_trans_id" value="346738" />

<input type="hidden" name="vads_version" value="V2" />

<input type="hidden" name="signature" value= "95338e879ea543a4dada12107a0c1c4d95ed3239"/>

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

</form>

Related documents