HiPay Professional – Displaying the payment page
Service endpoints
Environment
Endpoint
Stage
https://test-ws.hipay.com/generate
Production
https://ws.hipay.com/generate
Request parameters
Field name
Format
Length
Description
wsLogin
AN
32
Your API Web service login.Find it in the HiPay Professional back office > Toolbox section.
wsPassword
AN
32
Your API Web service password.Find it in the HiPay Professional back office > Toolbox section.
categoryId
N
11
The order or product categories are attached to, and depend upon, the merchant site’s category. Depending on the category that is associated with the site, the categories that are available to the order and products will NOT be the same. You can obtain the list of order and product category IDs for the merchant site at these URLs.Production platform:https://payment.hipay.com/order/list-categories/id/[production websiteID]Stage platform:https://test-payment.hipay.com/order/list-categories/id/[stage websiteID]
websiteId
N
11
ID of the website created on merchants’ account.
currency
A
3
The currency specified in your HiPay Professional account. This three-character currency code complies with ISO 4217.
amount
R
-
The total order amount. It should be calculated as a sum of the items purchased, plus the shipping fees (if present), plus the tax fees (if present).
rating
AN
3
Age category of your order.Accepted values:+12: For ages 13 and over+16: For ages 16 and over+18: For ages 18 and overALL: For all ages
locale
AN
5
Locale code of your customer (default to en_GB – English – Great Britain). It may be used for sending confirmation emails to your customer or for displaying payment pages.Examples:en_GBfr_FRes_ESit_IThttps://professional.hipay.com/api/tools/locale/codes.xml
customerIpAddress
AN
15
IP address of your customer making a purchase
executionDate
AN
32
Date and time of execution of the payment in MySQL DATETIME format (Y-m-dTH:i:s). E.g.: 2014-12-25T10:57:55
manualCapture
N
1
Indicates how you want to process the payment.0: indicates transaction is sent for authorization, and if approved, is automatically submitted for capture.1: indicates this transaction is sent for authorization only. The transaction will not be sent for settlement until the transaction is submitted for capture manually by the merchant.
description
AN
255
Short description of the order
customerEmail
AN
32
Customer’s email address
urlCallback
AN
255
The URL will be used by our server to send you information in order to update your database. Please refer to the “Server-to-Server notification” section.
urlAccept
AN
255
The URL to return your customers to once the payment process is completed successfully.
urlDecline
AN
255
The URL to return your customers to after the acquirer declines the payment.
urlCancel
AN
255
The URL to return your customers to when they decide to abort the payment.
urlLogo
AN
255
This URL is where the logo you want to appear on your payment page is located.Important: HTTPS protocol is required.
merchantReference
AN
255
Merchants’ order reference.
merchantComment
AN
255
Merchants’ comment concerning the order.
emailCallback
AN
255
Email used by HiPay Professional to post operation notifications.
freedata
AN
-
Custom data. You may use these parameters to submit values you wish to receive back in the API response messages or in the notifications. E.g.: you can use these parameters to get back session data, order content or user info.
Full PHP example:
SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,
'cache_wsdl' => WSDL_CACHE_NONE,
'soap_version' => SOAP_1_1,
'encoding' => 'UTF-8'
);
// STEP 2 : Soap client initialization
$client = new SoapClient('https://ws.hipay.com/soap/payment-v2?wsdl', $options);
// STEP 3 : Soap call on confirm method of manual-capture webservice
$result = $client->generate(array('parameters'=>array(
'wsLogin' => 'YOUR wsLogin',
'wsPassword' => 'YOUR wsPassword',
'categoryId' => 'xxx',
'websiteId' => 'YOUR websiteID',
'description' => 'Test HiPay',
'currency' => 'EUR',
'amount' => '',
'rating' => '',
'locale' => 'fr_FR',
'customerIpAddress' => '',
'manualCapture' => '0',
'executionDate' => '',
'customerEmail' => '',
'urlCallback' => '',
'urlAccept' => '',
'urlDecline' => '',
'urlCancel' => '',
'urlLogo'=> '',
'merchantReference' => 'test-123'
)));
// STEP 4 : Response
$url = $result->generateResult->redirectUrl;
echo "
Open page";
?>