Unzer

Accept Unzer Prepayment with server-side-only integration

Build your own payment form to add Unzer Prepayment to your checkout page.

Overview

Prepayment payment method doesn’t require any input from the customer on the merchant website. The Payment API will generate payment information with which the customer can fulfill the payment via bank transfer.

Before you begin

Step 1: Create a Payment Type resource
server side

When creating the payment type Prepayment, 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/prepayment

Body: {}
$unzer = new Unzer('s-priv-xxxxxxxxxx', SupportedLocale::GERMAN_GERMAN);
$prepayment = $unzer->createPaymentType((new Prepayment()));
Unzer unzerInstance = new Unzer("s-priv-xxxxxxxxxx");
Prepayment prepayment = unzerInstance.createPaymentType(new Prepayment());

The response will look similar to the following example:

{
  "id": "s-ppy-vazzovscvxnu",
  "method": "prepayment",
  "recurring": false,
  "geoLocation": {
    "clientIp": "115.77.189.143",
    "countryCode": "VN"
  }
}

For a full description of Prepayment payment type creation, check API reference.

Next steps

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