Table of Contents

Java SDK

The GiroCheckout SDK for Java allows for an easy integration of our GiroCheckout API into all sorts of Java-based applications. The SDK includes all interfaces that the GiroCheckout API by GiroSolution GmbH offers for the creation of requests and the processing of their responses. The SDK takes care of all the technical details, such as hash checksum calculation and thread-safe processing.

Complementing this documentation, you may find additional information both in the separate documentation package linked to in the download section, and on http://api.girocheckout.de.

Download

Download GiroCheckout Java SDK 2.5.2
Download GiroCheckout Java SDK Documentation

Examples and inclusion

An important requirement for the usage of GiroCheckout is the creation of a user account and corresponding payment projects on https://www.girocockpit.de.

Important note regarding notify and redirect

GiroCheckout uses two parallel channels for the communication between the GiroCheckout server and the Shop: The notification (or notify for short) and the redirect. The notify is a server to server call in the background, whereas the redirect runs over the customer's browser, showing him the transaction result at the end. Both paths must function separately and independently from each other, in case one of them doesn't reach its destination. This way, the transaction is also successful if the notification happens to not arrive at the shop for whatever reason (so only the redirect could be successful) or if the customer interrupts the redirection to the shop site (so only the notify gets through). But of course a check is required on both sides whether the order has already been processed in the shop, in order to avoid a duplicate processing.

Please also see API Basics.

Including the Jar file

Start by adding the file girocheckout.jar to your build path.

Reference to your merchant account and your project

For all calls to the GiroCheckout API you require a reference to your merchant account and to the payment project used..

Merchant merchant = MerchantFactory.createMerchant(ihreHändlerID);
Project project = merchant.createProject(ihreProjektID, ihrProjektPasswort); 

Requests and responses

When sending a request towards GiroCheckout, begin by defining the data required for the transaction and then create the corresponding request on the Project object.

Example: Giropay payment

GiropayTransactionRequest request = project.createGiropayTransactionRequest(merchantTxId, amount, currency, purpose, bic, iban, info1Label, info2Label, info3Label, info4Label, info5Label, info1Text, info2Text, info3Text, info4Text, info5Text, urlRedirect, urlNotify);

Each request has an execute method that returns the corresponding response object.

Example:

GiropayTransactionResponse response = request.execute();
System.out.println("redirect: [" + response.getRedirect() + "]");
System.out.println("reference: [" + response.getReference() + "]"); 

Error handling

If there are problems during the communication with the GiroCheckout API, a GiroCheckoutProtocolException is thrown, which contains further information about the error. Furthermore, the GiroCheckoutException displays internal errors. Your can find a list of all error numbers here.

Result codes / payment result

The result of a payment is either contained in the notify/redirect URL or, in case of direct payments, in the correspnding response class. The code 4000 always signifies a successful transaction. All other codes give more information about what problem occurred. A list of all result codes can be found here.

Change Log

Version 2.5.2 - 24.09.2024

Version 2.5.1 - 04.06.2024

Version 2.4.11 - 14.02.2023

Version 2.4.10 - 21.12.2022

Version 2.4.9 - 14.10.2022

Version 1.2.5 - 31.05.2021

Version 1.2.4 - 10.02.2021

Version 1.2.3 - 16.01.2020

Version 1.2.2 - 09.08.2018

Version 1.2.1 - 28.03.2017

Version 1.2.0 - 21.02.2017

Version 1.1.1 - 01.07.2016

Version 1.0.3 - 08.05.2015

Version 1.0.2 - 27.01.2015

Version 1.0.1 - 21.01.2015

Version 1.0.0 - 20.10.2014