Accept Unzer Direct Debit with a server-side-only integration

Build your own payment form to add Unzer Direct Debit payment to the checkout page


The Unzer Direct Debit payment method is used to directly charge a customer bank account. It requires the customer to provide his IBAN on the merchants website. You can see an example of the Unzer Direct Debit component on our demo page.

Before you begin

Step 1: Create a Payment Type resource
server side

Data for the Unzer Direct Debit payment:

Payment data Description
iban (required) The IBAN of the customer

When creating the payment type Unzer Direct Debit, you need to send a request to the Unzer API. The response will contain an id , this is later referred to as typeId. You will need this typeId to perform the transaction.

POST https://api.unzer.com/v1/types/sepa-direct-debit

  "iban" : "DE89370400440532013000"
// get the IBAN from your payment form.
$unzer = new Unzer('s-priv-xxxxxxxxxx', SupportedLocale::GERMAN_GERMAN);
$sdd= $unzer->createPaymentType(new SepaDirectDebit($iban));
Unzer unzer = new Unzer(new HttpClientBasedRestCommunication(), "s-priv-xxxxxxxxxx");
SepaDirectDebit sdd = new SepaDirectDebit(iban);
sdd = unzer.createPaymentType(sdd);

The response looks similar to the following example:

    "id": "s-sdd-x9z2efxuebce",
    "method": "sepa-direct-debit",
    "recurring": false,
    "geoLocation": {
        "clientIp": "",
        "countryIsoA2": "DE"
    "iban": "DE89370400440532013000",
    "bic": "",
    "holder": ""

For a full description of Unzer Direct Debit payment type creation check API reference.

Next steps

The next steps are the same as for the UI components integration. See Accept Unzer Direct Debit with UI Components from Step 2 onwards.