NAV Navbar
Logo

Recommendations for the Klik & Pay account manager

Test / Production mode

In TEST mode, transactions are fictitious and transaction emails are not sent to customers, credit cards other than TEST cards are automatically rejected.

By default a Klik&Pay account is in TEST mode.

It is important to perform tests to ensure that your integration is functioning properly.

Test mode is only available for VISA and MASTERCARD cards. Tests cannot be performed with payment by cheque, bank transfer or SEPA.

Test cards

Only the following cards can be used for successful transactions in TEST mode.

Card Number
Visa 4012888888881881
Mastercard 5555555555554444

The expected CVV is 111 and you can enter any future date for the expiry date .

Integration of hosted mode

Introduction

Hosted mode involves redirecting your customers to our payment platform so that they can make their payment.

The data are sent by HTTPS/POST to our website from a form hosted on your site. The customer is then redirected to our secure pages to complete the transaction. On completion of the transaction our servers can return the transaction status and the variables specific to your site to the address entered in your Klik&Pay back office.

Configuring the authorized URLs

In production mode, Klik&Pay checks the source of the transactions. Only declared URLs are authorized to initiate transactions.
You can request the addition of further URLs from your Klik&Pay back office under “Account set-up” and then the “Set-up” sub-menu. For a site other than the authorized site, you will need to request the opening of a sub-account using a ticket. A distinction is made between domains and sub-domains. So, having http://www.example.com as an authorized url does not allow you to send transactions from http://example.com or from http://test.example.com

Default language

Example in HTML

<input type="hidden" name="L" value="EN"/>

The language of the payment page and of the emails sent to customers is specified using the variable “L”.

Language Expected value
French FR
English EN
German DE
Spanish ES
Italian IT
Dutch DU

Merchant ID

To identify yourself when you send data, you will need to specify your merchant ID .

You can find your merchant ID in your Klik&Pay back office under “Account Administration” then under the sub-menu “Account Information”.

Direct Payment and example

Direct Payment involves a single transaction.

Example in HTML

<form method="POST" action="https://www.klikandpay.com/paiement/order1.pl" accept-charset="UTF8" id="knp-form" target="_top">
<table border="0" cellpadding="2" cellspacing="0" width="20%">
<meta charset="UTF-8">
<tr>
<td width="50%">Surname:</td>
<td width="50%"><input type="text" name="NOM" size="24" value=""></td>
</tr>
<tr>
<td width="50%">First name:</td>
<td width="50%"><input type="text" name="PRENOM" size="24" value=""></td>
</tr>
<tr>
<td width="50%">Address:</td>
<td width="50%"><input type="text" name="ADDRESSE" size="24" value=""></td>
</tr>
<tr>
<td width="50%">Postcode:</td>
<td width="50%"><input type="text" name="CODEPOSTAL" size="24" value=""></td>
</tr>
<tr>
<td width="50%">Town:</td>
<td width="50%"><input type="text" name="VILLE" size="24" value=""></td>
</tr>
<tr>
<td width="50%">Country:</td>
<td width="50%"><select size="1" name="PAYS">
<option value="CH" selected="selected">Switzerland</option>
<option value="FR">France</option>
</select>
</td>
</tr>
<tr>
<td width="50%">Tel:</font></td>
<td width="50%"><input type="text" name="TEL" size="24" value=""></td>
</tr>
<tr>
<td width="50%">E-mail:</font></td>
<td width="50%"><input type="text" name="EMAIL" size="24" value=""></td>
</tr>
<input type="hidden" name="ID" value="1234567890">
<input type="hidden" name="MONTANT" value="1">
<tr>
<td width="100%" colspan="2">
<p align="center"><input type="submit" value="Send" name="B1"></p></td>
</tr>
Required variables Description
ID Merchant ID
NOM Customer surname
PRENOM Customer first name
ADRESSE Customer address
CODEPOSTAL Customer postcode
VILLE Customer town
PAYS Customer country in ISO 3166 format (UK, FR, DE)
EMAIL End customer email address
TEL Customer telephone number
MONTANT Transaction amount
Optional variables Description
STATE Cardholder region/canton
SOCIETE End customer Company
DETAIL Basket function, described below
FAX End customer fax number
L Payment page language, e.g. FR or EN
RETOUR Second part of URL for dynamic return
RETOURVOK Second part of URL for customer return if the transaction is accepted
RETOURVHS Second part of URL for customer return if the transaction is rejected

Payment in X-times

Payment in X-times allows your customers to spread the payment over several months. Two types of payment integration in X-times are available.

The first option simply requires the addition of the variable “EXTRA” to the direct payment form, which allows payment in up to 6 instalments to be proposed. The instalments are always presented on same day of the month as the initial transaction (e.g. an original transaction made on 5 January in 4x will be presented as 5 February, 5 March and 5 April). The amount sent in the MONTANT variable is divided by the number of instalments sent in the “XFOIS” variable.

Integration of standard X-times payment

Example in HTML

<input type="hidden"  name="MONTANT" value="1">
<input type="hidden"  name="EXTRA" value="4FOIS">
X-times payment variables Description
MONTANT Total transaction amount
EXTRA Number of instalments. (2FOIS, 3FOIS, 4FOIS, 5FOIS or 6FOIS)

Integration of payment in two instalments with variable amount

The second integration method allows a transaction to be made in 2 instalments. The amount entered in the variable “MONTANT” will be debited immediately and the amount in the variable “MONTANT2” will be debited on the date entered in the variable “DATE2”.

Example in HTML

<input type="hidden"  name="MONTANT" value="1">
<input type="hidden"  name="MONTANT2" value="5">
<input type="hidden"  name="DATE2" value="2016-12-29">
X-times payment variables Description
MONTANT First payment amount (debited on the same day)
MONTANT2 Second instalment amount
DATE2 Second instalment debit date Format YYYY-MM-DD

Payment by subscription

We offer two solutions for the implementation of subscription payment on your site.

Subscription managed from the Klik&Pay back office

In the first solution, you create a subscription type in your Klik&Pay back office under “Account set-up” and then the “Subscription options” sub-menu and then you send us the subscription ID in the “ABONNEMENT” variable.

Example in HTML

<input type="hidden"  name="ABONNEMENT" value="123ABC465DEF7890">
Subscription payment variables Description
ABONNEMENT Klik&Pay subscription ID

Dynamically created subscription

With this integration your form sends information about the subscription to us.

Example in HTML

<input type="hidden"  name="creat_abo_amount" value="1">
<input type="hidden"  name="creat_abo_frequency" value="30">
<input type="hidden"  name="creat_abo_frequency_type" value="D">
<input type="hidden"  name="creat_abo_name" value="abo30jours">
Subscription payment variables Description
creat_abo_amount Subscription amount
creat_abo_frequency Subscription frequency
creat_abo_frequency_type Subscription frequency (Can be set to ‘D’ for daily, ‘W’ for weekly and ‘M’ for monthly); the maximum duration of a subscription is 6 months.
creat_abo_name Subscription name

Deferred payment

Deferred payment creates a footprint on the credit card of an end customer so that the subsequent withdrawal can be made. Two types of deferred payment are available, auto-debit or auto-cancellation of the payment, without human intervention, after 4 days.

Example in HTML

<input type="hidden"  name="DIFFERE" value="1">
Deferred payment variables Description
DIFFERE Expected value 1 or 0

Customer return

Whether the transaction is accepted or declined, a message generated by the Klik&Pay platform informs the customer of the bank’s response.

If the transaction is accepted, a message confirming that the transaction has been successful is presented to the customer and an email is sent.

If the transaction is declined, the “transaction declined” message is displayed to the customer. After this step, the customer is redirected to a URL specified by the merchant if s/he clicks on “back to shop”.

The customer return URLs can be configured from the Merchant’s Back Office from “Account set-up” and then the “Set-up” sub-menu.

Transaction accepted URL

URL towards which the customer is redirected if the transaction is accepted. You can add variables to this URL through the “RETOURVOK” variable.

Example:

Successful transaction return page: http://www.example.com/retourok.php?commande=

You sent us the order number with the RETOURVOK variable - here RETOURVOK = 12345

Once a transaction is accepted, the customer is redirected to the URL: http://www.example.com/retourok.php?commande=12345

Transaction declined URL

URL towards which the customer is redirected if the transaction is declined.

You can add variables to this URL through the “RETOURVHS” variable.

Example:

Declined transaction return to page: http://www.example.com/retourko.php?commande=

You sent us the order number with the RETOURVHS variable - here RETOURVHS = 54321

If a transaction is declined, the customer is redirected to the URL: http://www.example.com/retourko.php?commande=54321

Dynamic return

Dynamic return is used to update your system following a transaction.

Dynamic return description:

The dynamic return is a GET call made by our servers to your system to inform it of the transaction status. The dynamic return is made when your customer makes the transaction, as soon as we receive the answer from the cardholder’s bank. So even if your end customer closes their browser, the dynamic return will be performed.

Confidentiality

The dynamic return runs in the background and is not, therefore, sent through the end customer’s browser. The dynamic return URL can never be seen by the customer.

Variables returned:

The variables returned with the dynamic return can be edited in your back office under “Account set-up” and then “Dynamic Return”, where you will find several default variables.

If you wish to return additional information with dynamic return you will need to use the “RETOUR” variable in your form. The information contained in this variable is sent in the dynamic return.

Dynamic return URL: http://www.example.com/retour_dyn.php?commande=

You sent us the order number with the RETOUR variable, here RETOUR=54321

Once a transaction is accepted, our server calls the URL in the background: http://www.example.com/retour_dyn.php?commande=54321

You can send several parameters in the RETOUR variable, e.g. RETOUR=54321&MON_CLIENT=123456

Dynamic Return in a declined transaction

In principle, a “dynamic return” request is only made in the event of a successful transaction.

If a dynamic return is required for a declined transaction, simply make the request by ticket to the technical service, which will enable the function.

In this case, the “RESPONSE” parameter will determine the result:

If it is ‘00’, the transaction is accepted

For any other value, the transaction is declined.

Deferred dynamic return

For transactions where validation can not be achieved directly (cheque, bank transfer, SEPA), the dynamic return takes place when payment is accepted by our services, so the dynamic return is not immediate for these payment methods.

For specific developments or e-commerce solutions that use sessions (PrestaShop, Magento, osCommerce …) when the dynamic return is managed in deferred mode (cheque or bank transfer, sepa) the session number must not be used to retrieve information, since it will certainly have expired. Instead the order number, sent in the RETOUR variable when the transaction is created, must be used.

Basket function

Example in HTML

<input type="hidden" name="DETAIL" value="REF:4545%Q:2%PRIX:100%PROD:Produit test|
REF:958%Q:1%PRIX:500%PROD:Produit test 2|">

Your shop must send us the data from a HTML/POST form to our servers. The expected variables are: REF:REFERENCE PRODUIT%Q:QUANTITE%PRIX:PRIX%PROD:NOM DU PRODUIT|

For example two ordered products (without line breaks): REF:4545%Q:2%PRIX:100%PROD:Produit test|REF:958%Q:1%PRIX:500%PROD:Produit test 2|

The basket allows the merchant to receive an email containing details of products or services paid for by the customer during each order.

Basket information is also included in the Klik&Pay management Back Office in the transaction details.

The basket contents are sent in the DETAIL variable in the order form.



Server / server integration - hybrid

Introduction

Server / server mode is an integration of the Klik & Pay solution on your website which you can use to cash credit cards transparently without your customers having to leave your website.

Hybrid mode is an integration in which the customer makes the first transaction on the Klik&Pay pages; once the transaction has been made we return an alias of the card which will allow you to represent your customers’ cards without the need to ask them to send it through our payment pages. For example, this solution allows you to manage recurrent payments from your site.

It is important to note that the payment methods are “direct” or “deferred” - there is no subscription or X-times. If you want subscription or X-times, you must use the “alias” system, as explained below.

Merchant ID and alias

Doc info Doc id

You can find the merchant ID in the Klik&Pay back office under “Account Administration” then under the sub-menu “Account Information”.

The alias is an imprint of your customer’s card; it is returned after a successful transaction and can be used to represent a valid card without asking the customer to enter his/her credit card details again. You use the alias to automate payment and to set up, for example, a system for subscription or payment by instalments.

URLs and private key

Doc param Doc key

https://www.klikandpay.com/paiement/server_server.pl

When server / server mode is enabled on your account, a private key is generated in your Klik&Pay back office. Your private key is required for cancellation (full or partial) of a transaction or for confirmation / amendment of a deferred transaction or duplication of a transaction.

Direct payment and example

Example in PHP

<?php
$url = "https://www.klikandpay.com/paiement/server_server.pl";
$data = array(
    'ID'         => $id,
    'IP'         => $ip,
    'NOM'        => $nom,
    'PRENOM'     => $prenom,
    'ADRESSE'    => $adresse,
    'CODEPOSTAL' => $codepostal,
    'VILLE'      => $ville,
    'PAYS'       => $pays,
    'TEL'        => $tel,
    'EMAIL'      => $email,
    'MONTANT'    => $montant,
    'NUMCARTE'   => $numcart,
    'EXPMOIS'    => $expmois,
    'EXPANNEE'   => $expannee,
    'CVV'        => $cvv,
    'KEY'        => $private_key
);

            $ch = curl_init();          
            curl_setopt($ch, CURLOPT_URL, $url);
            curl_setopt($ch, CURLOPT_POST, true);

            curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);


            $result_curl = curl_exec($ch);

            if(!$result_curl){
                echo 'Curl error: ' . curl_error($ch) . "<br />";
                die();
            }

        ?>

<?php print_r($result_curl); ?>
Required variables Description
ID Merchant ID
IP Real IP address of the customer
NOM Customer surname
PRENOM Customer first name
ADRESSE Customer address
CODEPOSTAL Customer postcode
VILLE Customer town
PAYS In ISO 3166 format (UK, FR, DE)
EMAIL End customer email address
TEL Customer telephone number
MONTANT Transaction amount
NUMCARTE End customer card number
EXPMOIS Expiry month of end customer’s card (2 values are expected, e.g. 02 or 11)
EXPANNEE Expiry year of end customer’s card (4 values are expected, e.g. 2020)
CVV End customer card CVV
PRIVATE_KEY Merchant’s private key, retrieved from the merchant’s BO in the Set-up section (only available with the server / server option enabled)
Optional variables Description
STATE Cardholder region/canton
SOCIETE End customer company
DETAIL Basket function, described below
FAX End customer fax number
DIFFERE Yes = 1 - the transaction will be deferred, to be validated or cancelled depending on the account’s set-up

Cancellation (full or partial) script:

You can use this script to cancel or make a partial payment on an accepted transaction or to cancel a deferred transaction awaiting validation.

Script URL: https://www.klikandpay.com/paiement/cancel_transaction.pl

Required variables Description
ID Merchant ID
TX Number of the transaction retrieved when the transaction is accepted
MONTANT The amount must be less than or equal to the authorization amount.
PRIVATE_KEY Merchant’s private key, retrieved from the merchant’s BO in the set-up section (only available with the server / server option enabled)

Deferred transaction validation script:

You can use this script to validate the desired amount on a deferred transaction.

Script URL: https://www.klikandpay.com/paiement/validedifferee.pl

Required variables Description
ID Merchant ID
TX Number of the transaction retrieved when the transaction is accepted
MONTANT The amount must be less than or equal to the authorization amount.
PRIVATE_KEY Merchant’s private key, retrieved from the merchant’s BO in the set-up section (only available with the server / server option enabled)

Transaction duplication script:

You can use this script to duplicate a transaction so that you can perform a new transaction with the card alias. You can manage subscriptions, for example, using this solution.

Script URL: https://www.klikandpay.com/paiement/duplicate.pl

Required variables Description
ID Merchant ID
IP Real IP address of the customer used for the first transaction
MONTANT Transaction amount
ALIAS To be retrieved during the first transaction
PRIVATE_KEY Merchant’s private key, retrieved from the merchant’s BO in the set-up section (only available with the server / server option enabled)
DIFFERE Yes = 1 - the transaction will be validated or cancelled depending on the account’s set-up

Response in server-server mode

In server-server mode, our servers respond immediately to your requests, with two types of response being possible.

Text response

The text response is the default option enabled on all our accounts in server-server mode.

Example text response on an accepted transaction

OK<BR>1234567890-123456<BR>4.2<BR>615087C6CBGDTZUFC945B6DEAAAAAAAAAAAAA195430285643226HB

The information is displayed as follows:

Transaction status <BR> Klik&Pay transaction number <BR> Transaction score <BR> Transaction alias

Example text response on a declined transaction

NO<BR>Holder number invalid

In the case of a declined transaction only the following information is available:

Transaction status <br>Reason declined

JSON response

The json response is only available on request for activation by ticket to the technical department from your Klik&Pay back office.

Example JSON response on an accepted transaction

Example JSON response on an accepted transaction

{
"Response": "OK",
"Code": "00",
"Reason": "Transaction acceptée",
"Transaction": "1234567890-123456",
"Descriptor": "KP*",
"Scoring": "2",
"Token": "615087C6CBGDTZUFC945B6DEAAAAAAAAAAAAA195430285643226HBDTC536EADBBBBBBBBBBBFA97BB85582DBE447BEAA60C5503",
}

In the case of an accepted transaction with a JSON response, the information returned is as follows:

Variables Description
“Response” “OK”,
“Code” “00”,
“Reason” “Acceptance message”,
“Transaction” “Klik&Pay transaction number”,
“Descriptor” “The wording that will appear on the customer account”,
“Scoring” “Score out of 10”,
“Token” “The alias to be saved for a future duplicate tx”,


Example JSON response on a declined transaction

Example JSON response on a declined transaction

{
"Response": "NO",
"Code": "05",
"Reason": "Ne pas honorer",
}

In the case of a declined transaction with a JSON response, the information returned is as follows:

Variables Description
“Response” “NO”,
“Code” “Error code”,
“Reason” “Reason declined”,

Status of transactions

Answer description
0 Approved transaction
1 Too many connections
2 Contact the card issuer
3 Invalid acceptor
4 Keep the card
5 Do not honor
7 Keep the card
8 Approve after identification
12 Invalid transaction
13 Invalid amount
14 Invalid carrier number
15 Unknown card issuer
30 Format error
31 Unknown card issuer
33 Expired credit card
34 Suspected fraud
41 Lost card
43 Stolen Card
51 Insufficient funds
54 Expired credit card
56 Missing card
57 Transaction not permitted to cardholder
58 Prohibited transaction
59 Fraud suspected
60 The card acceptor must contact the acquirer
61 Exceeds the limit of the amount of withdrawal
63 Not complied with safety regulations
68 Response not received or received too late
75 Unauthenticated 3D Secure cardholder
90 System off
91 Unreachable Card Issuer
96 System malfunction
97 Unreachable Card Issuer
98 Unreachable Card Issuer
99 Unreachable Card Issuer
100 Wrong merchant ID
101 Unauthorized IP
102 Missing field
103 Duplicate
104 Server/server mode not activated
105 Temporary problem
106 Blocked card
107 Empty CVV field
108 Unauthorized payment mean
109 Too many transactions with this card
110 Fraud risk too high
111 US customer for Tobacco transaction
112 Alias missing
113 Invalid Alias
114 Wrong private key
115 Invalid payment methode
116 Transaction not found
117 Unable to refund on this payment mean
118 Insufficient balance to realize this operation
119 An error has occured, please contact us
120 Pending transaction
121 Token not valid
122 Transaction already being processed
123 Request not authorized
514 Invalid amount
516 Last name not specified
517 First name not specified
518 Address not specified
519 Zip code not specified
520 Town not specified
521 Country not specified
522 Email not specified
523 Invalid email
524 Forbidden countrie
525 Invalid data
526 Unauthorized Referer
527 Empty referer
528 Invalid card number

Modules for CMS

Cliquez ici pour accéder à la liste des CMS compatibles.