Unzer

See example of integrating Unzer.

Introduction

The Emporix system allows to integrate with Unzer as the payment provider.

What we support, is the Pay by Invoice solution as the post-checkout approach. No other Unzer integration is possible at the moment.

The diagram shows how Unzer sequence looks like when it's integrated with Emporix:

Gateway configuration

Prerequisite

For the Emporix and Unzer configuration, you need to have the private key and the public key from your Unzer account.

Creating the payment mode

To create the new payment mode, execute the following request:

curl --location --request POST 'https://api.emporix.io/payment-gateway/{TENANT}/paymentmodes/config' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {EMPORIX_AUTH_TOKEN}' \
--data-raw '{
    "code": "unzer",
    "active": true,
    "provider": "UNZER",
    "configuration": {
        "Unzer/PaymentMethodType": "{UNZER_PAYMENT_METHOD_TYPE}",
        "Unzer/PublicKey": "{UNZER_PUBLIC_KEY}",
        "Unzer/PrivateKey": "{UNZER_PRIVATE_KEY}",
        "Unzer/CustomerType": "{UNZER_CUSTOMER_TYPE}",
        "Unzer/ReturnURL" : "{UNZER_RETURN_URL}"
    }
}'
  • UNZER_PAYMENT_METHOD_TYPE - PAYLATER_INVOICE is the supported payment method.

  • UNZER_PUBLIC_KEY - The public key from your Unzer account.

  • UNZER_PRIVATE_KEY - The private key from your Unzer account.

  • UNZER_CUSTOMER_TYPE - Either B2B or B2C.

  • UNZER_RETURN_URL - The URL to which the customer should be redirected after an external payment.

Storefront implementation

The integration with Unzer does not require any specific implementation on the storefront side. Emporix implements the server-side-only integration with Unzer, therefore there is no need to generate any token - it's done by the Emporix Payment Gateway service.

The only thing you need to ensure is that you’re providing the following data during the authorization request:

{
  "order":
    {
      "id":"{ORDER_ID}"
    },
  "paymentModeId":"{PAYMENT_MODE_ID}"
}
  • ORDER_ID - Identifier of an order.

  • paymentModeId - Identifier of the payment mode that you got from https://api.emporix.io/payment-gateway/{TENANT}/paymentmodes/frontend endpoint.

To learn more about the Unzer solution, see the Unzer documentation.

Last updated

Was this helpful?