saferpay payment page v4.1.3 en

31
Saferpay – Payment Page Specification Version 4.1.3

Upload: miguel-noriega

Post on 28-Nov-2014

1.162 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page

Specification

Version 4.1.3

Page 2: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 2

Table of contents

1 Introduction .........................................................................................................................................................4

1.1 Requirements ......................................................................................................................................................4

1.2 Presentation of the Payment Page .....................................................................................................................4

1.3 Data Security and PCI DSS .................................................................................................................................5

1.4 Supported Payment Means.................................................................................................................................5

1.5 Format Information..............................................................................................................................................5

2 Saferpay Client Library .......................................................................................................................................62.1 Installation ...........................................................................................................................................................6

2.1.1 .NET Client Library ................................................................................................................................................6

2.1.2 Java Client Library.................................................................................................................................................62.2 Key Generation....................................................................................................................................................6

2.2.1 .NET Client Library ................................................................................................................................................6

2.2.2 Java Client Library.................................................................................................................................................7

3 Classes and Methods of the Client Library........................................................................................................8

3.1 Summary..............................................................................................................................................................8

3.1.1 Creation of the payment link..................................................................................................................................8

3.1.2 Check of the authorization response......................................................................................................................8

3.1.3 Settlement of a Reservation ..................................................................................................................................8

3.2 MessageFactory Class ........................................................................................................................................8

3.3 MessageObject Class..........................................................................................................................................8

3.4 Open() Method.....................................................................................................................................................9

3.5 CreatePayInit() Method........................................................................................................................................9

3.6 VerifyPayConfirm() Method.................................................................................................................................9

3.7 CreatePayComplete() Method.............................................................................................................................9

3.8 CreateRequest() Method .....................................................................................................................................9

3.9 SetAttribute() Method..........................................................................................................................................9

3.10 GetAttribute() Method..........................................................................................................................................9

3.11 GetURL() Methode ...............................................................................................................................................9

3.12 Capture() Method.................................................................................................................................................9

4 Saferpay https Interface....................................................................................................................................10

4.1 https Interface Address.....................................................................................................................................10

4.2 Transaction Processing Scheme......................................................................................................................104.3 Generation of the Payment URL via the CreatePayInit Address.....................................................................11

4.4 Checking the Authorization Response via the VerifyPayConfirm Address ...................................................11

4.5 Example VerifyPayConfirm ...............................................................................................................................124.6 Settlement of a Payment via the CreatePayComplete Address ......................................................................12

4.7 Call of the Payment Page via the Redirect Address .......................................................................................13

4.7.1 Disadvantages of Redirect................................................................................................................................... 13

4.7.2 https Interface Address........................................................................................................................................13

4.7.3 Transaction processing with Redirect ..................................................................................................................13

5 Processing Steps .............................................................................................................................................. 14

5.1 Overview ............................................................................................................................................................ 14

5.2 Process Description.......................................................................................................................................... 14

6 Parameters......................................................................................................................................................... 16

6.1 PayInit Parameters ............................................................................................................................................166.2 PayConfirm Parameters....................................................................................................................................19

6.3 PayComplete Parameters .................................................................................................................................21

Page 3: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 3

6.4 PayComplete Response....................................................................................................................................22

7 Saferpay Testaccount ....................................................................................................................................... 23

8 Examples ...........................................................................................................................................................24

8.1 Important Note...................................................................................................................................................24

8.2 C# mit der .NET LIB...........................................................................................................................................248.3 Java mit der Java LIB........................................................................................................................................25

8.4 Command Line Calls with the Java LIB ...........................................................................................................26

8.5 https Interface....................................................................................................................................................28

9 Error-Codes .......................................................................................................................................................30

10 Contact...............................................................................................................................................................31

10.1 Saferpay Integration Team ................................................................................................................................ 31

10.2 Saferpay Support Team.....................................................................................................................................31

Page 4: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 4

1 Introduction

The Saferpay Payment Page, in the following also called PP, is an online payment form provided andhosted by Saferpay. This document describes the integration of the PP in shop systems with theClient Library, in the following also called LIB and the Saferpay https Interface in the following alsocalled HI.

1.1 Requirements

The use of the PP requires the fulfillment of the following conditions:

A corresponding Saferpay eCommerce licence and thus the existence of a valid identifier withUsername and Password for the Saferpay system.

At least one active Saferpay terminal, via which the payments can be processed, exists and theassociated TERMINALID, respectively the concerned Saferpay ACCOUNTID, is available.

The existence of an valid acceptance contract for credit cards or another payment means.

In order to be able to use the HI, a HI configuration with the merchant data must be setup onSaferpay side. The keys for the signature of the (SSL secured) communication with saferpay areprovided by this configuration. The setup is costfree but must be individually requested for eachSaferpay business account. Please send a formless e-mail requesting the setup [email protected] if you have concluded your contract in swizerland or [email protected] if you have a contract for an other country (D, NL, A, etc.).If you choose to use the Redirect Address please take care to transmit the complete webaddress of the SUCCESSLINK in your mail since the storage of this address on saferpay side isthen mandatory.

1.2 Presentation of the Payment Page

Saferpay only supports the full-page presentation of the Payment Page. Saferpay will not provide anysupport for other implementations like within an inline frame or as popup.

Saferpay with that meets the request of many processors and the credit card organizations VISA andMastercard, forbidding for security reasons the integration of their payment means in iFrames orpopups since when using iFrames or popups for presentation the user does not see in the addressbar of the browser that he left the shop site. Since on the PP the user is requested to enter hispayment means data he must be aware at any moment on which site he is.

An advantage of the full-page presentation is a considerably better customer usability since URL andSSL certificate are visible at any moment and you also benefit from less payment aborts due tobrowser settings or security checks of the acquirer.

Page 5: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 5

1.3 Data Security and PCI DSS

The credit card organizations have initiated the security program named PCI DSS (Payment CardIndustry Data Security Standard) to prevent fraud and abuse of credit cards.

Please take care to respect the PCI DSS guidelines in the design of your payment processes and theusage of the Saferpay Authorization Interface. In combination with the optional Saferpay Secure CardData service the payment process can be designed so safe that no credit card number is processed,stored or transferred via your (web)servers. The risk of abuse of the credit card data is therebyreduced and it precludes the necessity an expensive PCI DSS review of the merchant system.

If you have any questions regarding PCI DSS, please contact your acquirer or a qualified securityprovider (see https://www.pcisecuritystandards.org/pdfs/pci_pa-dss_list.pdf).

1.4 Supported Payment Means

The Saferpay Payment Page actually allows the processing of transactions for the following paymentmeans:

Visa (including the 3-D Secure security technology Verified by Visa)

MasterCard (including the 3-D Secure security technology MasterCard Secure Code)

Maestro international

V PAY

American Express

Diners Club

J.C.B.

Union Card

ELV electronic direct debit (Germany only)

giropay

iDEAL

PayPal

mpass

eps

ClickandBuy

PostFinance Card und PostFinance E-Finance

1.5 Format Information

The following abbreviations for format information are used in this document:a Letters (a - z, A - Z)

n numeric characters (0 - 9)

an alphanumeric characters (a - z, A - Z, 0 - 9)

s Special characters (- : ; / \ < > . =)

ans alphanumeric and special characters

Page 6: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 6

2 Saferpay Client Library

The Saferpay LIB is to be installed on the server that provides the application of the merchant.After the installation Saferpay classes and methods are available on the server.

The LIB is available as .NET- or Java-version. The corresponding installation files can be downloadedin the download area of the Saferpay Backoffice via the following addresses:

.NET LIB: https://www.saferpay.com/download/saferpay_dotnet.exeJava LIB: https://www.saferpay.com/download/saferpay_java.zip

If neither the .NET LIB nor the Java LIB can be used or if a local installation is not possible thesaferpay https Interface can be used as an alternative.

2.1 Installation

2.1.1 .NET Client Library

Please start the downloaded file “saferpay_dotnet.exe” and follow the instructions of thesetup-assistant.

2.1.2 Java Client Library

For the integration in java please unpack the downloaded .zip file “saferpayac_java_v1.0.14.zip” andcopy the included “saferpay.jar” into the directory jre/lib/ext.

For the integration in other programming- or script-languages the “saferpay.jar” can be copied in anydirectory.

2.2 Key Generation

Besides the SSL encrypted communication between the LIB and the Saferpay servers the data of aSaferpay account is also protected by a digital signature according to the PGP (Pretty Good Privacy)policy. For this purpose a key pair must be generated and stored on the merchant-server for everySaferpay Account. The generation of the keys requires a valid login and password for the SaferpayBackoffice. After successfully generating the keys the password can be changed via the SaferpayBackoffice since the generation of the key is only to be done once and does not need to be repeated.Generated key pairs remain valid and should therefore be kept safe with restricted access.

2.2.1 .NET Client Library

After installation of the .NET LIB a GUI (Graphical User Interface) is available for the key generation.The GUI can be found at:

The Saferpay Client Setup opens. Please follow the subsequent instructions.

Root- respectively admistrator rights on the destination server are required to install the LIB and togenerate a new configuration (generation of keys).

Page 7: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 7

2.2.2 Java Client Library

The key generation with the java LIB is done via the command line. Therefore please change to thedirectory with the Saferpay.jar and enter the following command:

java -jar Saferpay.jar -conf -p <destination directory> -rhttps://www.saferpay.com/user/setup.asp -u e99867001 -w XAjc3Kna

The example uses the access data of the Saferpay Test account.

The command line help can be called with:

java -jar Saferpay.jar -h

Page 8: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 8

3 Classes and Methods of the Client Library

This chapter describes the available classes and methods for the integration of the Saferpay PaymentPage.

3.1 Summary

3.1.1 Creation of the payment link

The payment link is generated with the CreatePayInit() method. The generated MessageObject mustbe filled with the transaction parameters before the call of GetURL().

1) Creation of a MessageFactory Object.

2) Accessing the corresponding configuration with Open().

3) Call of CreatePayInit(), in order to get an empty MessageObject.

4) Call of SetAttribute() with the MessageObject to set the parameters.

5) Call of GetURL() to get a payment link for the PP.

3.1.2 Check of the authorization response

1) Creation of a MessageFactory Object.

2) Accessing the corresponding configuration with Open().

3) Call of VerifyPayConfirm(), in order to verify DATA and SIGNATURE.

4) Reading ID and TOKEN with GetAttribute()

5) Storing the values of ID and TOKEN

3.1.3 Settlement of a Reservation

6) Creation of a MessageFactory Object.

7) Accessing the corresponding Configuration with Open().

8) Call of CreatePayComplete(), in order to get an empty MessageObject.

9) Call of SetAttribute() with the MessageObject to set ID and TOKEN.

10) Call of Capture() with the MessageObject.

3.2 MessageFactory Class

Class MessageFactory{

void Open(String path);MessageObject CreatePayInit();MessageObject VerifyPayConfirm(String data, String signature);MessageObject CreatePayComplete(String id, String token);MessageObject CreateRequest(String msgtype);

};

3.3 MessageObject Class

Class MessageObject{

void SetAttribute(String name, String value);String GetAttribute(String name);String GetURL();void Capture();

};

Page 9: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 9

3.4 Open() Method

The reference to the key pair of the merchant account is done by the call of Open(). In order toensure that the other function calls of this MessageFactory do also refer to these keys Open() mustbe called before all other methods of the MessageFactory object.

3.5 CreatePayInit() Method

With CreatePayInit() a payment link can be generated. After setting the parameter values the link isgenerated by GetURL().

3.6 VerifyPayConfirm() Method

Verifies the digital signature of the confirmation message (MSGTYPE=PayConfirm) returned to theshop via SUCCESSLINK or NOTIFYURL in order to ensure that the response has not beenmanipulated.

3.7 CreatePayComplete() Method

With CreatePayComplete() transactions with status Reservation can be settled or canceled, aReservation can be settled with reduced Amount, a transaction with status Payment can be canceledand the Batch Close can be engaged.CreatePayComplete() always need the parameters ID and ACCOUNTID for a settlement. For asettlement with reduced amount the additional parameter AMOUNT must be transmitted. For thecancel of a Reservation or a Payment as well as for the start of the Batch Close the additionalparameter ACTION is required.

3.8 CreateRequest() Method

Creates a new request MessageObject of the specified message type (msgtype).

3.9 SetAttribute() Method

With SetAttribute() the needed parameters for the message are set. Please take care to respect thecase sensitivity of the used parameter names

3.10 GetAttribute() Method

GetAttribute() returns the value of a parameter of the message. If the parameter is not included in themessage the call fails. Please take care to respect the case sensitivity of the used parameter names.

3.11 GetURL() Methode

The call of GetURL() returns the payment link of the message

3.12 Capture() Method

The call of Capture() transmits the message of the message type CreatePayComplete

Page 10: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 10

4 Saferpay https Interface

The Saferpay https Interface can be used as an alternative to the Saferpay Client Library.This might be the case if for example the LIB can not be installed or used on the destination system.

4.1 https Interface Address

Das Saferpay https Interface can be accessed via the following web addresses:

Generation of a payment link:https://www.saferpay.com/hosting/CreatePayInit.asp

Verifying an authorization response:https://www.saferpay.com/hosting/VerifyPayConfirm.asp

Settlement of a payment:https://www.saferpay.com/hosting/PayCompleteV2.asp

For security reasons the parameters ACTION and AMOUNT are not available for the use of the HIPayComplete address.

4.2 Transaction Processing Scheme

A transaction generally meets the following scheme:

1. Generation of the payment link (CreatePayInit).2. The payment is independently processed by customer via Saferpay3. In case of successful authorization the SUCCESSLINK is called with the authorization

response.4. The answer should be checked for plausibility/mainpulation (VerifyPayConfirm).5. Finally the Payment must be settled in order to get the money transfer initiated via the close

batch. The settlement can be done or manually via the Saferpay Backoffice or automated viathe PayComplete message.

Page 11: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 11

4.3 Generation of the Payment URL via the CreatePayInit Address

The shop system transmits the Saferpay PayInit parameters via GET or POST to the HI. There adigitally signed payment link is generated by means of the signature of the concerned SaferpayAccount and returned back to the shop system. The generated link can then be used for a paymentfor example by including it as link or button on the shop page.

Example call (GET):

https://www.saferpay.com/hosting/CreatePayInit.asp?AMOUNT=…

The result is returned as plain text without html tags:

https://www.saferpay.com/vt/Pay.asp?DATA=%3cIDP%20ACCOUNTID%3d%2299867%2d94913159%22%20ALLOWCOLLECT%3d%22no%22%20AMOUNT%3d%22100%22%20BACKLINK%3d%22%2e%22%20CURRENCY%3d%22DEM%22%20DELIVERY%3d%22no%22%20DESCRIPTION%3d%22Testkauf%20Warenkorb%22%20EXPIRATION%3d%2220010408%2012%3a13%3a50%22%20FAILLINK%3d%22%2e%22%20KEYID%3d%220%2d37217%2dea645c3f3f0911d583d70050da413f31%22%20MSGTYPE%3d%22PayInit%22%20SUCCESSLINK%3d%22%2e%22%20TOKEN%3d%22ea645c5d3f0911d583d70050da413f31%22%2f%3e&SIGNATURE=2f1ec1fa51002817941c22e98b9047422ba9ff8fce8b61dab8208a5aa8c82be7cda02ff8a66930481fc19b16d05e7bcedd2b0e5be98fecad3d48bd43916a502f

In case of an error the identifier “ERROR” is returned together with an error description:

ERROR: Missing AMOUNT attribute

4.4 Checking the Authorization Response via the VerifyPayConfirm Address

After the successful payment the SUCCESSLINK is called and with it the parameters DATA undSIGNATURE are returned by GET to the shop system. The parameter DATA contains thePayConfirm message with the details of the authorization response and the parameter SIGNATUREthe key used by saferpay to sign DATA. In order to exclude a manipulation of the authorizationresponse both parameters should be send to the VerifyPayConfirm address directly after reception.The HI will answer the request with OK or ERROR.

Page 12: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 12

4.5 Example VerifyPayConfirm

The parameters DATA and SIGNATURE are send by GET or POST to the Saferpay Gateway:

Example call (GET):

https://www.saferpay.com/hosting/VerifyPayConfirm.asp?DATA=…

If the digital signature corresponds to the values of DATA the positive result is indicated by returningOK, the Saferpay ID and TOKEN:

OK:ID=56a77rg243asfhmkq3r&TOKEN=%3e235462FA23C4FE4AF65…

In case of an error the text "ERROR" is returned together with an error description:

ERROR: Possible manipulation

4.6 Settlement of a Payment via the CreatePayComplete Address

The settlement of an authorization is realized by sending the parameters ACCOUNTID and ID byGET or POST to the CreatePayComplete address of the HI. The Hi answers with OK oder ERROR.

For security reasons settlements with reduced amount are not possible via the CreatePayCompleteaddress of the HI. The parameters ACTION and AMOUNT are therefore ignored.

Example call (GET):

https://www.saferpay.com/hosting/PayComplete.asp?ACCOUNTID=99867-94913159&ID=5sfhmkq3rg54345abcd234&spPassword=XAjc3Kna*

In case of successful processing OK is returned:

OK

In case of an error the text ERROR is returned together with an error description:

ERROR: Error description

* The submission of the parameter spPassword is specific to the use of the Saferpay test account. On lifeaccounts this parameter must not be submitted.

Page 13: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 13

4.7 Call of the Payment Page via the Redirect Address

If for some reason the used system is not able to handle or receive the response data of the SaferpayHI (if for example the web server settings does not allow it or because a shop system basedexclusively on JavaScript is used) the Redirect address of the HI can be used to open the PaymentPage.

4.7.1 Disadvantages of Redirect

If Redirect is used the payment data has to be submitted via the web page allowing possiblemanipulation by experienced web users. The PayConfirm message could also be changed orsimulated.

4.7.2 https Interface Address

The Saferpay https Interface can be accessed via the following web address:

Call of the Payment Page via Redirect:

https://www.saferpay.com/hosting/Redirect.asp

4.7.3 Transaction processing with Redirect

The PayInit parameters needed for the payment are transmitted by GET or POST to the Saferpay HI.Thereupon the HI generates a payment link and opens the Payment Page directly via “redirect”.Once the customer has successfully carried out his payment via the PP the authorization response(PayConfirm message) is transmitted to the Saferpay HI where it is checked for possible manipulation(VerifyPayConfirm) and then the Result is transmitted by GET with the SUCCESSLINK to the shopsystem. The Result of the check is indicated with the parameter RESULT. RESULT may have thevalue “0” for success or “1” in case of error or manipulation.

Example call (GET):

https://www.saferpay.com/hosting/Redirect.asp?AMOUNT=1095&…

The call will directly lead the customer, via his browser, to the PP in order to carry out his payment.

After the payment the digital signature will be checked by the HI and the result will be forwarded byGET with the SUCCESSLINK. If the check was successful the result with RESULT=0 is displayedand other PayConfirm parameters with additional authorization details are available.

http://www.shop.de/kasse_ok.php?RESULT=0&ID=J89HBV...

If the check of the digital signature fails just RESULT=1 is returned:

http://www.shop.de/kasse_ok.pl?Session=123&RESULT=1

We strongly recommend to only use the Redirect address if the circumstances does not allowother proceeding. The CreatePayInit Address should always be preferred and used if possible!

Page 14: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 14

5 Processing Steps

5.1 Overview

The following chart shows the process-flow of a successful online payment via the Saferpay PaymentPage:

Showing the payment link

Checkout

Authorization response

PP opens

Goods andamount are set.

Generation of thepayment link with

CreatePayInit „Payment““ (clickon payment link)

Checks andgrants

authorization

Gets confirmationand closesdialogue

Response data to the shopExecutes

VerifyPayConfirm

ExecutesPayComplete &ships the goods

Webshop Customer Saferpay

Adds goods to theshop basket

Shows paymentdialogue

Tim

e

Processor

Authorization request

Inserts transactionas Payment

Enters Paymentmeans details and

pays

Sends PayComplete

5.2 Process Description

Once the customer has filled his shop basket and the amount is set the shop creates thepayment link (CreatePayInit). On the checkout page the webshop presents the payment linkas „Payment”“ button or something similiar.

The customer clicks on „Payment“ and the Payment Page does open.

The dialogue of the PP presets a payment means or the customer chooses a paymentmeans for the transaction on the PP and then enters the needed payment credentials.

The online authorization of the payment means is processed.

The processor verifies and checks the authorization request and grants the authorization.

The processor returns the authorization response.

In the PP the customer is shown a confirmation of the payment and he is requested to finishthe operation by clicking on “Close”.

The PP is closed and the customer is redirected to the shop via the SUCCESSLINK. Theshop gets the response data of the authorization.

1

2

3

4

5

67

8

9

10 11

1

2

3

4

5

7

8

6

Page 15: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 15

The merchant system checks the payment confirmation (VerifyPayConfirm) and stores ittogether with the transaction details.

The amount is settled (PayComplete) and the order can be processed. The settlement canbe done or directly after receiving the authorization response by the web-shop or at a latertime for example from without an ERP system.

Via the call of PayComplete the status of a transaction changes from “Reservation” to“Payment”. The transaction status is shown in the Saferpay Backoffice Journal

9

10

The settlement of a Reservation is mandatory for the Batch Close. The Batch Close onlyprocesses transactions with the status “Payment” and forwards them to the Processor inorder to engage the financial transfer. The money is than subsequently credited ascompound item to the merchants business account. The merchant gets a settlement listfrom the payment means processor.

Depending on the business case the settlement can also be done at a later time, normallywithin 6 days since that is the normal lifetime of a reservation. Since this value might varydepending on processor and payment means please ask your processor for furtherinformation.

The Batch Close can be done manually or automatically.

11

Page 16: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 16

6 Parameters

6.1 PayInit Parameters

This table lists the available parameters for the CreatePayInit message.If not specified as Optional the parameters are mandatory.

Parameter Format DescriptionACCOUNTID ns[..15] The Saferpay account number of the merchant for this

transaction.e.g. 99867-94913159 for the Saferpay Test Account.

AMOUNT n[..8] Authorization amount in minor currency unite.g. 1230 in EUR means EUR 12,30.

CURRENCY a[3] ISO 4217 three-letter currency codee.g. CHF or EUR

DESCRIPTION ans[..50] Contains a description of the offer which is shown in the PPand after successful payment as well within the details of thetransaction in the Saferpay Backoffice.It is not possible to customize the representation with controlcharacters. It is therefore not recommended to use more than50 digits even if technically possible. To ensure the correctprocessing of special characters the value must betransmitted html encoded (entities or unicode).

ORDERID ans[..80] Optional, (mandatory for the payment mean giropay)ORDERID should contain the shop reference number for thepayment. In order to permit a later assignment thetransmitted value should be unique.Saferpay can process 80 characters. On Processor sidegenerally far less characters can be processed.Long values are generally truncated. In practice a length of12 characters has been proven to be a good value. In case ofdoubt please ask your processor how many characters hecan process.

VTCONFIG an[..20] OptionalVTCONFIG designates the configuration that is to be used forthe Payment Page. In the Backoffice different configurationscan be created. Some options as e.g. the insert of a logo canonly be activated via the configuration.Value: name of the configuration in the Saferpay Backoffice.

SUCCESSLINK ans[..1024] URL to which the customer is to be forwarded to via browserredirect after the successful reservation. Saferpay appendsthe confirmation message (PayConfirm) by GET to this URL.

FAILLINK ans[..1024] URL to which the customer is to be forwarded to via browserredirect if the authorization attempt failed.

BACKLINK ans[..1024] URL to which the customer is to be forwarded to via browserredirect if he aborts the transaction

Page 17: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 17

Parameter Format DescriptionNOTIFYURL ans[..1024] Fully qualified URL which in case of successful authorization

is called directly by the saferpay server transmitting theconfirmation message (PayConfirm) by POST. Onlystandard ports (http port 80, https port 443) are allowed.Other ports will not work. We recommend to implementNOTIFYURL in order to ensure the reception of theconfirmation message independently from possible errors orproblems on customer or browser side. To facilitate thecorrelation between request and response it has proven to beuseful to add a shop session ID as GET parameter to theNOTIFYURL.

AUTOCLOSE n[..2] OptionalSpecifies the period of time in seconds to close the PPautomatically after the successful authorization;recommended value: “0”e.g. AUTOCLOSE=0

CCNAME a[..3] OptionalSpecifies whether the The card holder name input field of thePP is active or not.Values: “yes” or “no”Default value is “yes”

NOTIFYADDRESS ans[..50] OptionalEmail address of the merchant. In case of successfulauthorization Saferpay sends a confirmation email to thisaddress.

USERNOTIFY ans[..50] OptionalEmail address of the customer. In case of successfulauthorization Saferpay sends a confirmation email to thisaddress.

LANGID a[2] OptionalLanguage code according to ISO 6391-1Presets the language for the PP session. A list of theavailable language codes can be found at:http://support.saferpay.de/download/LanguageList.pdf.Per default the Virtual Terminal uses the browsers languagesetting to determine PP language. If the browser language isnot recognized German is taken as default language.

SHOWLANGUAGES a[..3] OptionalActivates the language menu within the Saferpay PaymentPage.Values: “yes” or “no”.Default value is “yes”

PROVIDERSET ns[..40] OptionalUse this parameter to restrict the payment means selectablein the Payment Page. Without PROVIDERSET all activepayment means of the account are shown.With PROVIDERSET a comma separated List of ProviderID’s hast to be transmitted. On the Saferpay test accountProvider ID 90 (Saferpay Test Card) and 634 (Giropay) areavailable. If needed the ID’s of the active payment means ofyour account can be obtained from our integration team [email protected].

DURATION n[14] OptionalSpecifies the duration of the payment link. After expiration ofDURATION the payment link will be declined.Format: YYYYMMDDhhmmss.

Page 18: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 18

Parameter Format DescriptionCARDREFID ans[..40] Optional

Reference number for credit card number and expiry date orbank-account information (german direct debit). The valuecan be defined by the E-Commerce application or Saferpay(new). The use implies the service “Saferpay Secure CardData”Values: unique reference value or “new” *

DELIVERY a[..3] OptionalSpecifies whether an address form will be displayed.Values: “yes”, “no”Default value is “yes”

Address optionsADDRESS a[..8] Optional

If this Attribute is set, an input form for an address appearsduring the PP session.Values: "DELIVERY", "CUSTOMER", "BILLING"

If the address information is already available it can be forwarded to the Payment Page with thefollowing parameters in order to open the address form prefilled with the concerned data. Pleasenote that the data has to be transmitted html encoded (as entity or unicode) in order to ensure thecorrect processing of special characters.COMPANY ans[..50] Optional

Company nameGENDER a[1] Optional

gendervalues: “f” (female), “m” (male), “c” (company)

FIRSTNAME ans[..50] Optionalfirstname

LASTNAME ans[..50] Optionallastname

STREET ans[..50] Optionalstreet

ZIP an[..10] Optionalzip code

CITY ans[..50] Optionalcity

COUNTRY a[2] Optional2 letter country code according to ISO 3166. A list of thecountry codes can be found under:http://support.saferpay.de/download/CountryList.pdf.

EMAIL ans[..50] Optionale-mail address

PHONE ns[..20] Optionalphone number

* In order to use CARDREFID=”new” a numeric start value must be set by Saferpay for the Account.This concerning please contact [email protected].

Page 19: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 19

6.2 PayConfirm Parameters

The following table lists the parameters returned within the PayConfirm message.

Parameter Format DescriptionMSGTYPE a[..30] Always contains the value „PayConfirm “.VTVERIFY ans[..40] May contain additional information concerning the transaction

processing.Default value: “(obsolete)”

KEYID ans[..40] Id of the key used to generate the signatureID an[28] Unique saferpay transaction identifier.

TOKEN ans[..40] May contain additional information concerning the transactionprocessing.Default value: "(unused)"

ACCOUNTID ns[..15] The Saferpay account number of the merchant for thistransaction.e.g. 99867-94913159 for the Saferpay Test Account.

AMOUNT n[..8] Authorization amount in minor currency unite.g. 1230 in EUR means EUR 12,30.

CURRENCY a[3] ISO 4217 three-letter currency codee.g. CHF or EUR

CARDREFID ans[..40] Optional (only if the parameter was submitted within theCreatePayInit message.)Contains the reference number for credit card number andexpiry date or bank-account information (only german directdebit).

SCDRESULT n[..4] Optional (only if the parameter CARDREFID was submittedwithin CreatePayInit Message)contains the response code of the SCD registration:0 request processed successfully.7000 internal error (see DESCRIPTION).7001 request could not be processed successfully7002 Cardtype not available on this terminal7003 Parameter with invalid content or format.7004 CARDREFID not found (only with authorization).7005 Missing parameter in registration request.7006 CARDREFID already exists in database.7007 No permission for SCD use.

PROVIDERID n[..4] Contains the Provider ID of the payment means processorPROVIDERNAME ans[..30] Contains the name of the payment means processorORDERID an[..80] Optional

The reference number of the merchant submitted withCreatePayInit.

IP ns[..15] Optional*Contains the IP address of the customer. Only available ifRiskmanagement is activated.

IPCOUNTRY a[2] Optional*2-letter ISO 3166 country code, e.g. CH, DE, AT…Contains the IP geo location country of the customer’s IPaddress. If the country cannot be retrieved, IPCOUNTRY willbe empty or contain “IX”.

Page 20: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 20

CCCOUNTRY a[2] Optional*2-letter ISO 3166 country code, e.g. CH, DE, AT…of thecountry of the card issuing bank.If the country cannot not be retrieved CCCOUNTRYwill contain the code “IX”

MPI_LIABILITYSHIFT a[..3] Optional**Indicates whether technically formal liability shift is granted.Values: "yes" oder "no"

ECI n[1] Optional**Electronic Commerce IndicatorIs needed for the flagging of 3-D Secure transactions(„Verified by Visa“, „MasterCard SecureCode“):0 = SSL secure internet payment, no liability shift.1 = SSL secure internet payment with 3DS and liability shift,

customer is taking part in the process.2 = SSL secure internet payment with 3DS and liability shift,

customer is not taking part in the process.XID ans[28] Optional**

Extra identifierThis base64 string is generated by the MPI and references tothe instance within the 3-D Secure protocol.

CAVV ans[28] Optional**Cardholder Authentication Verification ValueFor a MasterCard the UCAF value is contained.Saferpay, independently from the credit card type, uses thevalue CAVV.

* Only available with Saferpay Risk Management.

** Required condition is the participance in the 3D-Secure process. („Verified by Visa“, „MasterCardSecureCode“)

Attention! Not all processors can check the liabilityshift during the authorization and so eventually excludeit already within the authorization response. Therefore itis possible that even if MPI_LIABILITYSHIFT and ECIindicates an existing liability shift the processor mightrefuse it for contractual reasons. In case of thisconcerning questions please contact your processorfor further information.

Page 21: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 21

6.3 PayComplete Parameters

This table lists the available parameters for the CreatePayComplete message.If not specified as Optional the parameters are mandatory.

Parameter Format DescriptionID an[28] Saferpay transaction identifier returned by the PayConfirm

Message. Mandatory parameter excepted ifACTION=CloseBatch

AMOUNT n [..8] OptionalAmount to settle in minor currency unite.g. “1230” corresponds to 12,30 in EUR

ACCOUNTID ns[..15] The Saferpay account identifier of the merchant for thistransaction.e.g. 99867-94913159 for the Saferpay Test Account.

ACTION OptionalIs used for special processing options.Possible values are: "Settlement", "CloseBatch", "Cancel"

SettlementInstructs the Saferpay system to change the status of thetransaction from “Reservation“ to “Payment”. Payments areforwarded by the next Batch Close to the concernedprocessor engaging the actual fund transfer. With theparameter AMOUNT an amount inferior than reserved can besettled. The difference between reserved and settled amountis canceled. The reserved amount is the maximum amountthat can be settled.

Batch CloseInstructs the Saferpay system to engage the Batch Close forthe specified ACCOUNTID. If no ACCOUNTID is specifiedthe call fails.

CancelWith that call a Reservation can be discarded or a Paymentcanceled as long as it has not been processed by the BatchClose.A discarded Reservation remains visible for 6 days in„Discarded Reservations” in the Backoffice after what it willbe erased from the database. Whereas canceled Payments,flagt as “Cancellation Payment”, will remain visible in thebackoffice.

If the ACTION parameter is not submitted the default valueACTION=“Settlement“ is used.

Page 22: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 22

6.4 PayComplete Response

The response to the PayComplete request contains the following parameters:

Parameter Format DescriptionMSGTYPE a[..30] Alway contains the value „PayConfirm“.ID an[28] Saferpay transaction identifier.RESULT n[..4] Contains the Result of the PayComplete request.

0 = request successfully processed.≠0 = request not successfully processed.

MESSAGE ans[..30] Contains a textual response to the settlement request.

AUTHMESSAGE ans[..30] Can contain additional textual information about the requestprocessing.

Page 23: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 23

7 Saferpay TestaccountDuring Integration phase the use of the Saferpay test account is recommended.

ACCOUNTID 99867-94913159

Login e99867001

Password XAjc3Kna

spPassword XAjc3Kna (only for the https Interface)

Card Number DescriptionAccount number:12345674Bank code:76026000

Giropay TestaccountTestaccount for giropay payments.

9451123100000111 Saferpay test card „enrolled“.Test card for 3D-Secure processing

9451123100000004 Saferpay test card „not enrolled“.Normal test card without 3D-Secure processing

9451123100000103 Saferpay test card ResultTest card for special Result codes.The last two digits of the AMOUNT attributes define the result code of theauthorization response. If their value is set to "00" the authorization will besuccessful. If the value is not equal to zero Saferpay will send an answer withRESULT="65" where AUTHRESULT will contain the error code.

The test account is used by multiple developers. Therefore you’ll possibly find transactions andpayments on the test account that have been initiated and processed by others.

The test account only supports Saferpay Testcards. Other card types are not available. TheTestcards do not have fixed card verification numbers (CVC /CVV2) or expiry dates. Both can befreely chosen. The CVC must be a numeric 2- or 4 digt value and the expiry must be a valid date inthe future. A part from this the payment with the testcards is similar to a transaction on a life account.

Page 24: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 24

8 Examples

8.1 Important Note

Please note that own values should always be transmitted html encoded (or as html entity or asUnicode) in order to ensure that possible special characters are correctly processed.

8.2 C# mit der .NET LIB

Generating the payment link with CreatePayInit:

MessageFactory mf = new MessageFactory();mf.Open(""); // Saferpay configuration path, e.g. "c:\\Programs\\Saferpay\\Client"mo_payinit = mf.CreatePayInit();

string m_accountid = "99867-94913159";string m_amount = "2095";string m_currency = "EUR";string m_description = "Test Einkauf";string m_address = "no";string m_orderid = "0815-4711";string m_backlink = "http://www.myshop.com/back.aspx";string m_faillink = "http://www.myshop.com/Fail.aspx";string m_successlink = "http://www.myshop.com/Success.aspx";string m_notifyurl = "http://www.myshop.com/notify.aspx";

mo_payinit.SetAttribute("ACCOUNTID", m_accountid);mo_payinit.SetAttribute("AMOUNT", m_amount);mo_payinit.SetAttribute("CURRENCY", m_currency);mo_payinit.SetAttribute("DELIVERY", m_address);mo_payinit.SetAttribute("ORDERID", Server.HtmlEncode(m_orderid));mo_payinit.SetAttribute("DESCRIPTION", Server.HtmlEncode(m_description));mo_payinit.SetAttribute("SUCCESSLINK", m_successlink);mo_payinit.SetAttribute("BACKLINK", m_backlink);mo_payinit.SetAttribute("FAILLINK", m_faillink);mo_payinit.SetAttribute("NOTIFYURL", m_notifyurl);

string paymenturl = mo_payinit.getURL();

Verifying the PayConfirm message:

string data = Request.QueryString.Get("DATA");string signature = Request.QueryString.Get("SIGNATURE");

MessageFactory mf = new MessageFactory();mf.Open("");mo_payconfirm = mf.VerifyPayConfirm(data, signature);

string id = mo_payconfirm.GetAttribute(ID);

Settlement of the payment CreatePayComplete:

MessageFactory mf = new MessageFactory();mf.Open("");MessageObject mo_paycomplete = mf. CreatePayComplete(ID, "");

mo_paycomplete.SetAttribute("ID", id);mo_paycomplete.SetAttribute("ACCOUNTID", m_accountid);

MessageObject captureresponse = mo_paycomplete.Capture();

Page 25: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 25

PayComplete response:

int result = Convert.ToInt32(response.GetAttribute("RESULT"));if (result == 0){

String id = captureresponse.GetAttribute("ID");String msg = captureresponse.GetAttribute("MESSAGE");Console.WriteLine("Verbuchung erfolgreich!");

}else{

Console.WriteLine("Verbuchung fehlgeschlagen!");return;

}

8.3 Java mit der Java LIB

Generating the payment link with CreatePayInit:

import Saferpay.*import org.apache.commons.lang.*

MessageFactory mf = new MessageFactory();mf.Open(""); // Saferpay configuration path, e.g. "c:\\Programme\\Saferpay\\Client"MessageObject mo_payinit = mf.CreatePayInit();

String m_accountid = "99867-94913159";String m_amount = "2095";String m_currency = "EUR";String m_description = "Test Einkauf";string m_address = "no";String m_orderid = "0815-4711";String m_backlink = "http://www.myshop.com/back.jsp";String m_faillink = "http://www.myshop.com/Fail.jsp";String m_successlink = "http://www.myshop.com/Success.jsp";String m_notifyurl = "http://www.myshop.com/notify.jsp";

mo_payinit.SetAttribute("ACCOUNTID", m_accountid);mo_payinit.SetAttribute("AMOUNT", m_amount);mo_payinit.SetAttribute("CURRENCY", m_currency);mo_payinit.SetAttribute("DELIVERY", m_address);mo_payinit.SetAttribute("ORDERID", StringEscapeUtils.escapeHtml(m_orderid));mo_payinit.SetAttribute("DESCRIPTION", StringEscapeUtils.escapeHtml(m_description));mo_payinit.SetAttribute("SUCCESSLINK", m_successlink);mo_payinit.SetAttribute("BACKLINK", m_backlink);mo_payinit.SetAttribute("FAILLINK", m_faillink);mo_payinit.SetAttribute("NOTIFYURL", m_notifyurl);String paymentURL = mo_payinit.getURL();

Verifying the PayConfirm message:

import Saferpay.*

String data = request.getParameter("DATA");String signature = request.getParameter("SIGNATURE");

MessageFactory mf = new MessageFactory();mf.Open("");MessageObject mo_payconfirm = mf.VerifyPayConfirm(data, signature);

String id = mo_payconfirm.GetAttribute(ID);

Page 26: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 26

Settlement of the payment CreatePayComplete:

MessageFactory mf = new MessageFactory();mf.Open("");MessageObject mo_paycomplete = mf.CreateRequest("CreatePayComplete");

mo_paycomplete.SetAttribute("ID", id);mo_paycomplete.SetAttribute("ACCOUNTID", m_accountid);

MessageObject captureresponse = mo_paycomplete.Capture();

PayComplete response

int result = response.GetAttribute("RESULT");if (result == 0){

String id = captureresponse.GetAttribute("ID");String msg = captureresponseresponse.GetAttribute("MESSAGE");System.out.println("Verbuchung erfolgreich!");

}else{

System.out.println("Verbuchung fehlgeschlagen!");return;

}

8.4 Command Line Calls with the Java LIB

Generating the payment link with CreatePayInit:

java -jar Saferpay.jar -payinit -p C:\Programme\Saferpay\Client -a AMOUNT 1930 -a CURRENCYEUR -a DELIVERY no -a ACCOUNTID 99867-94913159 -a DESCRIPTION "Test Einkauf" -a ORDERID 0815-4711 -a FAILLINK "http://www.testshop.de/fail.php" -a SUCCESSLINK"http://www.testshop.de/success.php" -a BACKLINK "http://www.testshop.de/back.php" -aNOTIFYURL "http://www.testshop.de/log.php"

Created payment link:

https://www.saferpay.com/vt/Pay.asp?DATA=%3CIDP+ALLOWCOLLECT%3D%22no%22+EXPIRATION%3D%2220110325+16%3A06%3A53%22+DESCRIPTION%3D%22Test+Einkauf%22+BACKLINK%3D%22http%3A%2F%2Fwww.testshop.de%2Fback.php%22+AMOUNT%3D%221930%22+DELIVERY%3D%22no%22+ACCOUNTID%3D%2299867-94913159%22+SUCCESSLINK%3D%22http%3A%2F%2Fwww.testshop.de%2Fsuccess.php%22+CURRENCY%3D%22EUR%22+ORDERID%3D%220815-4711%22+FAILLINK%3D%22http%3A%2F%2Fwww.testshop.de%2Ffail.php%22+MSGTYPE%3D%22PayInit%22+KEYID%3D%220-99867-959af13b7be94dd99cbd20ac7caa5888%22+NOTIFYURL%3D%22http%3A%2F%2Fwww.testshop.de%2Flog.php%22+TOKEN%3D%228ae94d50562c01e0d24085728e033992%22%2F%3E&SIGNATURE=38FE7F5483578D24EDC3F9A8D00CC1B87733B5CE1F984F82E2ED084C52B01B0E783C8007F022610D93E26E2AA254C02245A09A0F25A0C5A4961B9FDFB9FF8F50

Page 27: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 27

Verifying the PayConfirm message:

Redirection to the shop after successful authorization via the SUCCESSLINK:

http://www.testshop.de/success.php?DATA=%3CIDP+MSGTYPE%3d%22PayConfirm%22+TOKEN%3d%22%28unused%29%22+VTVERIFY%3d%22%28obsolete%29%22+KEYID%3d%221-0%22+ID%3d%22brlb01AS3AphUA4fnAr0bQUS7thA%22+ACCOUNTID%3d%2299867-94913159%22+PROVIDERID%3d%2290%22+PROVIDERNAME%3d%22Saferpay+Test+Card%22+ORDERID%3d%220815-4711%22+AMOUNT%3d%221930%22+CURRENCY%3d%22EUR%22+IP%3d%22193.247.180.193%22+IPCOUNTRY%3d%22CH%22+CCCOUNTRY%3d%22XX%22+MPI_LIABILITYSHIFT%3d%22yes%22+MPI_XID%3d%22NEpiXQIKWz8xBBszF38FVUUwTAo%3d%22+ECI%3d%222%22+XID%3d%22NEpiXQIKWz8xBBszF38FVUUwTAo%3d%22+%2f%3E&SIGNATURE=b43f0ac94ce260fa520010558dc552ef1c67a839538bd2346d6e593fa74b3e2db22e6de0f494a312bf3436af662219144dda2bf472a5447da205009668a791fa

Received DATA:

<IDP MSGTYPE="PayConfirm" TOKEN="(unused)" VTVERIFY="(obsolete)" KEYID="1-0"ID="brlb01AS3AphUA4fnAr0bQUS7thA" ACCOUNTID="99867-94913159" PROVIDERID="90"PROVIDERNAME="Saferpay Test Card" ORDERID="0815-4711" AMOUNT="1930" CURRENCY="EUR"IP="193.247.180.193" IPCOUNTRY="CH" CCCOUNTRY="XX" MPI_LIABILITYSHIFT="yes"MPI_XID="NEpiXQIKWz8xBBszF38FVUUwTAo=" ECI="2" XID="NEpiXQIKWz8xBBszF38FVUUwTAo=" />

Received SIGNATURE:

b43f0ac94ce260fa520010558dc552ef1c67a839538bd2346d6e593fa74b3e2db22e6de0f494a312bf3436af662219144dda2bf472a5447da205009668a791fa

Executing VerifyPayConfirm:

java -jar Saferpay.jar -payconfirm -p C:\Programme\Saferpay\Client -d%3CIDP+MSGTYPE%3d%22PayConfirm%22+TOKEN%3d%22%28unused%29%22+VTVERIFY%3d%22%28obsolete%29%22+KEYID%3d%221-0%22+ID%3d%22brlb01AS3AphUA4fnAr0bQUS7thA%22+ACCOUNTID%3d%2299867-94913159%22+PROVIDERID%3d%2290%22+PROVIDERNAME%3d%22Saferpay+Test+Card%22+ORDERID%3d%220815-4711%22+AMOUNT%3d%221930%22+CURRENCY%3d%22EUR%22+IP%3d%22193.247.180.193%22+IPCOUNTRY%3d%22CH%22+CCCOUNTRY%3d%22XX%22+MPI_LIABILITYSHIFT%3d%22yes%22+MPI_XID%3d%22NEpiXQIKWz8xBBszF38FVUUwTAo%3d%22+ECI%3d%222%22+XID%3d%22NEpiXQIKWz8xBBszF38FVUUwTAo%3d%22+%2f%3E -sb43f0ac94ce260fa520010558dc552ef1c67a839538bd2346d6e593fa74b3e2db22e6de0f494a312bf3436af662219144dda2bf472a5447da205009668a791fa

Settlement of the Payment with CreatePayComplete:

java -jar Saferpay.jar -capture -p C:\Programme\Saferpay\Client –ibrlb01AS3AphUA4fnAr0bQUS7thA –a ACCOUNTID 99867-94913159 –of capt.txt

Page 28: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 28

8.5 https Interface

Generating the Payment Link with CreatePayInit:

https://www.saferpay.com/hosting/CreatePayInit.asp?spPassword=XAjc3Kna&ACCOUNTID=99867-94913159&ORDERID=123456789-001&AMOUNT=1000&CURRENCY=EUR&DESCRIPTION=Testkauf&SUCCESSLINK="http://www.myshop.com/Success.aspx"&FAILLINK="http://www.myshop.com/Fail.aspx"&BACKLINK="http://www.myshop.com/back.aspx"&NOTIFYURL="http://www.myshop.com/notify.aspx"

Response returns the Payment Link:

https://www.saferpay.com/vt/Pay.asp?DATA=%3cIDP+MSGTYPE%3d%22PayInit%22+MSG_GUID%3d%22939a4c930b5c482588d91f54f74ac110%22+CLIENTVERSION%3d%222.0%22+KEYID%3d%220-99867-7d5a273c0f5043e28811e764d6433086%22+TOKEN%3d%22bbf6577cd8e74d65a27f084c9cfe2592%22+ALLOWCOLLECT%3d%22no%22+DELIVERY%3d%22no%22+EXPIRATION%3d%2220110625+12%3a01%3a56%22+ACCOUNTID%3d%2299867-94913159%22+AMOUNT%3d%221000%22+CURRENCY%3d%22EUR%22+DESCRIPTION%3d%22Testkauf%22+SUCCESSLINK%3d%22http%3a%2f%2fwww.myshop.com%2fSuccess.aspx%22+BACKLINK%3d%22http%3a%2f%2fwww.myshop.com%2fback.aspx%22+FAILLINK%3d%22http%3a%2f%2fwww.myshop.com%2fFail.aspx%22+ORDERID%3d%22123456789-001%22+CCNAME%3d%22yes%22+NOTIFYURL%3d%22http%3a%2f%2fwww.myshop.com%2fnotify.aspx%22+%2f%3e&SIGNATURE=428b356c87f7fdcf44417f670197c4a6395385e623e224653610b94db8acc1ead509b7b5e6dfc465dcf987b3cf4b284fc799ee93ff9cb151c3bc9981e8320232

Verifying the PayConfirm Message:

Redirection to the shop after successful authorization via the SUCCESSLINK:

http://www.myshop.com/Success.aspx?DATA=%3CIDP+MSGTYPE%3d%22PayConfirm%22+TOKEN%3d%22%28unused%29%22+VTVERIFY%3d%22%28obsolete%29%22+KEYID%3d%221-0%22+ID%3d%22A668MSAprOj4tAzv7G9lAQUfUr3A%22+ACCOUNTID%3d%2299867-94913159%22+PROVIDERID%3d%2290%22+PROVIDERNAME%3d%22Saferpay+Test+Card%22+ORDERID%3d%22123456789-001%22+AMOUNT%3d%221000%22+CURRENCY%3d%22EUR%22+IP%3d%22193.247.180.193%22+IPCOUNTRY%3d%22CH%22+CCCOUNTRY%3d%22XX%22+MPI_LIABILITYSHIFT%3d%22yes%22+MPI_TX_CAVV%3d%22AAABBIIFmAAAAAAAAAAAAAAAAAA%3d%22+MPI_XID%3d%22CxMTYwhoUXtCBAEndBULcRIQaAY%3d%22+ECI%3d%221%22+CAVV%3d%22AAABBIIFmAAAAAAAAAAAAAAAAAA%3d%22+XID%3d%22CxMTYwhoUXtCBAEndBULcRIQaAY%3d%22+%2f%3E&SIGNATURE=7b2bb163f4ef86d969d992b4e2d61ad48d3b9022e0ec68177e35fe53184e6b3399730d1a3641d2a984ce38699daad72ab006d5d6a9565c5ae1cff8bdc8a1eb63

Received DATA:

<IDP MSGTYPE="PayConfirm" TOKEN="(unused)" VTVERIFY="(obsolete)" KEYID="1-0"ID="A668MSAprOj4tAzv7G9lAQUfUr3A" ACCOUNTID="99867-94913159" PROVIDERID="90"PROVIDERNAME="Saferpay Test Card" ORDERID="123456789-001" AMOUNT="1000" CURRENCY="EUR"IP="193.247.180.193" IPCOUNTRY="CH" CCCOUNTRY="XX" MPI_LIABILITYSHIFT="yes"MPI_TX_CAVV="AAABBIIFmAAAAAAAAAAAAAAAAAA=" MPI_XID="CxMTYwhoUXtCBAEndBULcRIQaAY=" ECI="1"CAVV="AAABBIIFmAAAAAAAAAAAAAAAAAA=" XID="CxMTYwhoUXtCBAEndBULcRIQaAY=" />

Received SIGNATURE:

7b2bb163f4ef86d969d992b4e2d61ad48d3b9022e0ec68177e35fe53184e6b3399730d1a3641d2a984ce38699daad72ab006d5d6a9565c5ae1cff8bdc8a1eb63

Page 29: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 29

https call VerifyPayConfirm:

https://www.saferpay.com/hosting/verifypayconfirm.asp?spPassword=XAjc3Kna&ACCOUNTID=99867-94913159&DATA=%3CIDP+MSGTYPE%3d%22PayConfirm%22+TOKEN%3d%22%28unused%29%22+VTVERIFY%3d%22%28obsolete%29%22+KEYID%3d%221-0%22+ID%3d%22A668MSAprOj4tAzv7G9lAQUfUr3A%22+ACCOUNTID%3d%2299867-94913159%22+PROVIDERID%3d%2290%22+PROVIDERNAME%3d%22Saferpay+Test+Card%22+ORDERID%3d%22123456789-001%22+AMOUNT%3d%221000%22+CURRENCY%3d%22EUR%22+IP%3d%22193.247.180.193%22+IPCOUNTRY%3d%22CH%22+CCCOUNTRY%3d%22XX%22+MPI_LIABILITYSHIFT%3d%22yes%22+MPI_TX_CAVV%3d%22AAABBIIFmAAAAAAAAAAAAAAAAAA%3d%22+MPI_XID%3d%22CxMTYwhoUXtCBAEndBULcRIQaAY%3d%22+ECI%3d%221%22+CAVV%3d%22AAABBIIFmAAAAAAAAAAAAAAAAAA%3d%22+XID%3d%22CxMTYwhoUXtCBAEndBULcRIQaAY%3d%22+%2f%3E&SIGNATURE=7b2bb163f4ef86d969d992b4e2d61ad48d3b9022e0ec68177e35fe53184e6b3399730d1a3641d2a984ce38699daad72ab006d5d6a9565c5ae1cff8bdc8a1eb63

Transaction ID returned within the response:

OK:ID=A668MSAprOj4tAzv7G9lAQUfUr3A&TOKEN=(unused)

Settlement of the Payment with CreatePayComplete:

https://www.saferpay.com/hosting/paycompletev2.asp?spPassword=XAjc3Kna&ACCOUNTID=99867-94913159&ID=A668MSAprOj4tAzv7G9lAQUfUr3A

Response returns the result:

OK:<IDP RESULT="0"/>

Page 30: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 30

9 Error-Codes

The following table lists possible error codes which can be returned by the Saferpay Library.

Code Name Description

Common Errors0x80040201 Context Missing No configuration context has been specified. Call the

Open function before calling any other function.0x80040202 File Not Found A file is missing in the configuration. Check if the

component was properly configured on the system.0x80040203 File Access Error A security violation occurred during file access.

Check permissions on configuration directories.0x80040204 Invalid File Format File with no valid XML content.0x80040206 Invalid Path An invalid path or URL was specified.0x80040207 Invalid Option An invalid Option value was specified.0x80040208 Request Failed A synchonous server request failed.0x80040209 Cryptographic Error An invalid key or key-identifier was specified in the

message.0x8004020f No Configuration No configuration found in the path specified by

Open.0x80040214 Verify Failed The verification of a signature failed because the

signature was invalid.HTTP Error0x80042019 Invalid URL An invalid URL was specified in a synchronous call

to the component.0x80042021 DNS Error An error occurred while looking up a hostname.

Most likely the reason for this problem will be a DNSconfiguration problem or missing proxy settings.

0x80042xxx HTTP Server Error The HTTP Server returned a unsuccessful statuscode. The errorcode & 0xfff will be the status codereturned by the server.

Socket Error0x80043xxx Socket Base Base for socket errors. The resulting error code is

the base error number plus the socket error code.

Page 31: Saferpay Payment Page V4.1.3 En

Saferpay – Payment Page Version 4.1.3 Page 31

10 Contact

10.1 Saferpay Integration Team

Do you have questions about this document or problems with the integration of Saferpay or do youneed assistance? Then please contact our integration team:

Saferpay SwitzerlandSIX Card Solutions AGHardturmstrasse 201CH-8021 Zürich+41 848 66 44 [email protected]

Saferpay EuropeSIX Card Solutions Deutschland GmbHBornbarch 9D-22848 Norderstedt+49 40 325 967- [email protected]

10.2 Saferpay Support Team

Do you have questions about error messages or do you encounter problems with your runningsystem? Then please contact our support team:

Saferpay SwitzerlandSIX Card Solutions AGHardturmstrasse 201CH-8021 Zürich+41 848 66 44 [email protected]

Saferpay EuropeSIX Card Solutions Deutschland GmbHBornbarch 9D-22848 Norderstedt+49 40 325 967- [email protected]

The Saferpay team wishes you every success with your Saferpay e-paymentsolution!