Migrate to Unzer Java SDK

Migrate from old heidelpay PHP SDK to the new Unzer PHP SDK.

About the migration

The new Unzer Java SDK works the same as the old heidelpay Java SDK, except for changes in:

  • Class names
  • Method names
  • Payment type names
  • Deprecated code
  • The LinkPay object
  • UI components


Download the new Unzer Java SDK from the Maven Central Repository.


The dependency for the new Unzer Java SDK is:

<!-- https://search.maven.org/artifact/com.unzer.payment/java-sdk/ -->

Migrate to Unzer Java SDK

To migrate to the new Unzer Java SDK, you need to update the code in your project.

All migration changes
To see all Java SDK migration changes, go here.

To migrate from the latest version of the old heidelpay Java SDK to the new Unzer Java SDK, implement the following changes (in any order).

Replace class and method names

In your project, replace the names of classes and methods.

This table shows examples of changes that you need to make:

All migration changes
To see all Java SDK migration changes, go here.

Element Old New
Namespace root for all classes com.heidelpay com.unzer
Class names Heidelpay Unzer
Method names getHeidelpay getUnzer

This example shows how these changes apply to your payment integration:

Heidelpay heidelpay = new Heidelpay('s-priv-xxxxxxxxxx');

Paypal paypal = new Paypal();
paypal = (Paypal) heidelpay.createPaymentType(paypal);

Unzer unzer = new Unzer('s-priv-xxxxxxxxxx');

Paypal paypal = new Paypal();
paypal = (Paypal) unzer.createPaymentType(paypal);

Replace payment type names

Replace the following payment type names:

Old New
InvoiceGuaranteed InvoiceSecured
InvoiceFactoring InvoiceSecured
SepaDirectDebitGuaranteed SepaDirectDebitSecured
HirePurchaseDirectDebit InstallmentSecured

Replace deprecated code

In your project, replace any code marked as deprecated in the heidelpay Java SDK.

The following methods were deprecated:

  • Paypage::getBasketImage
  • Paypage::setBasketImage
  • Paypage::getDescriptionMain
  • Paypage::setDescriptionMain
  • Paypage::getDescriptionSmall
  • Paypage::setDescriptionSmall
  • Paypage::getImpressumUrl
  • Paypage::setImpressumUrl
  • JsonPaypage::getBasketImage
  • JsonPaypage::setBasketImage
  • JsonPaypage::getDescriptionMain
  • JsonPaypage::setDescriptionMain
  • JsonPaypage::getDescriptionSmall
  • JsonPaypage::setDescriptionSmall
  • JsonPaypage::getImpressumUrl
  • JsonPaypage::setImpressumUrl

LinkPay object change

The ToString() method of the LinkPay object now returns a different object representation:

Old New
net.hpcsoft.mgw.papi.api.linkpay.model.LinkPayResponse net.hpcsoft.papi.api.linkpay.model.LinkPayResponse

Update your UI components

To update your UI components, go here.