Accept Unzer Bank Transfer with a server-side-only integration
Build your own payment form to add Unzer Bank Transfer payment to the checkout page
Overview
Unzer Bank Transfer is used to provide a convenient way to pay via the customers own bank account environment. The Payment is then handled as Prepayment. When the customer selects Unzer Bank Transfer as a payment method they should be redirected to our PIS (Payment Initiation Service) endpoint where they can authorize the payment.
Before you begin
- Check the basic integration requirements.
- Familiarize yourself with the general Server-side-only integration guide.
Step 1: Create a Payment Type resource server side
When creating the payment type Unzer Bank Transfer, you need to send a request to the Unzer API. The response contains 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/pis
Body: {}
$unzer = new UnzerSDK\Unzer('s-priv-xxxxxxxxxx');
$pis = new UnzerSDK\Resources\PaymentTypes\PIS();
$pis = $unzer->createPaymentType($pis);
Pis pis = new Pis();
Unzer unzer = new Unzer(new HttpClientBasedRestCommunication(), "s-priv-xxxxxxxxxx");
pis = unzer.createPaymentType(pis);
The response looks similar to the following example:
{
"id": "s-pis-ynkylhm788ro",
"method": "PIS",
"recurring": false,
"geoLocation": {
"clientIp": "127.0.0.1",
"countryCode": "DE"
}
}
Next steps
The next steps are the same as for the UI components integration. See Accept Unzer Bank Transfer with UI Components from Step 2 onwards.