> For the complete documentation index, see [llms.txt](https://docs.norrnext.com/unzer-hpp-for-phoca-cart/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.norrnext.com/unzer-hpp-for-phoca-cart/phoca-cart-configuration.md).

# Phoca Cart configuration

Learn how to configure Phoca Cart payment methods to accept payments via Unzer Hosted Payment Page.

After installing and enabling the plugin, create and configure an Unzer payment method in Phoca Cart.

In Joomla Administrator, navigate to **Components > Phoca Cart > Payment Methods** and click **New** in the toolbar.

***

### General Options (Payment Method Information)

Under the **General Options** tab, specify the basic payment method details:

* **Title** — Enter the customer-facing name of the payment method (e.g., `Credit Card / PayPal / Klarna (Unzer)` or `Online Payment`).
* **Alias** — Leave empty to auto-generate or specify an alias (e.g., `unzer`).
* **Payment Method** — Select **Phoca Cart Payment - Unzer HPP** from the dropdown list.
* **Published** — Set to **Yes**.
* **Calculation Type** — Select *Fixed Amount* or *Percentage* if you apply a surcharge for this payment method, or leave at default.
* **Cost** / **Additional Costs** — Enter any transaction fee if applicable.
* **Tax** — Select the tax rate applied to payment fees if applicable.
* **Image** — (Optional) Upload or select an image or payment badges to display next to the payment method at checkout.
* **Description** — (Optional) Add instructions or notes visible to customers on the checkout page.

***

### Configuration (Payment Method Options)

Switch to the **Payment Method Options** tab to configure the Unzer parameters.

#### Order Statuses

Define which Phoca Cart order statuses are assigned when transaction updates occur:

* **Payment Completed** — Select the order status applied upon a successful transaction confirmed by Unzer (default: **Completed**).
* **Payment Failed** — Select the order status applied when a transaction fails or is rejected by Unzer (default: **Failed**).
* **Payment Canceled** — Select the order status applied when the customer manually cancels payment on the hosted payment page (default: **Cancelled**).

{% hint style="info" %}
Phoca Cart includes a **Failed** order status that may be disabled by default. If it does not appear in the dropdown list, go to **Phoca Cart > Order Statuses** and ensure the **Failed** status is published.
{% endhint %}

#### Unzer Options

Configure your Unzer API credentials, checkout behavior, and data synchronization:

* **Private API Key** — Paste your private key from Unzer Insights (`s-priv-...` for sandbox testing, or `p-priv-...` for live production). *Required.*
* **Public API Key** — Paste your public key from Unzer Insights (`s-pub-...` for sandbox testing, or `p-pub-...` for live production). This key is used to authenticate incoming webhook notifications. *Required.*
* **Debug** — (*Yes* / *No*). When set to **Yes**, detailed transaction logs (payloads, order references, redirect URLs, errors, and webhook callbacks) are recorded in **Phoca Cart > Logs**. We strongly recommend enabling Debug during initial testing.
* **Checkout Type** — Controls how customer address forms appear on the Unzer Hosted Payment Page:
  * **Full** (*Default*) — Both billing and shipping address forms are displayed. If *Create Customer* and *Send Shipping Address* are enabled, these fields are pre-filled with data entered during Phoca Cart checkout.
  * **Payment Only** — Customer and address forms are omitted on the hosted page. Shoppers proceed directly to selecting their payment method. Ideal for fast checkouts or when customer information has already been confirmed.
  * **No Shipping** — Billing address fields are rendered, but shipping address fields are omitted. Recommended for digital downloads, virtual products, or services.
* **Send Order Items** — (*Yes* / *No*). When enabled, sends the entire shopping cart basket to Unzer, including item titles, attributes, quantities, prices, tax rates, shipping, fees, discounts, and rounding adjustments.

  <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p>Setting <strong>Send Order Items</strong> to <strong>Yes</strong> is <strong>required</strong> for secured payment methods such as <strong>Klarna</strong> (Pay Later, Slice It), <strong>Unzer Invoice</strong>, and <strong>Direct Debit Secured</strong>. Unzer's risk assessment engine requires detailed basket line items to evaluate and approve these transactions.</p></div>
* **Create Customer** — (*Yes* / *No*). Creates and associates an Unzer customer resource containing first name, last name, email, phone number, company, and billing address.

  <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p>Setting <strong>Create Customer</strong> to <strong>Yes</strong> is <strong>required</strong> for <strong>Klarna</strong>, <strong>Unzer Invoice</strong>, and <strong>Direct Debit Secured</strong>.</p></div>
* **Send Shipping Address** — (*Yes* / *No*). Transmits the customer's shipping address to Unzer. Recommended when using the *Full* checkout type with physical goods.
* **Language** — Controls the interface language displayed on the Hosted Payment Page:
  * **Auto Detect** (*Default*) — Automatically detects the customer's current Joomla front-end language (`en`, `de`, `nl`, `da`). If another language is used, English is selected by default.
  * **EN** — Force English.
  * **DE** — Force German.
  * **NL** — Force Dutch.
  * **DA** — Force Danish.

#### Payment Page Style

Customize the look and feel of the Unzer Hosted Payment Page to align with your shop's branding:

* **Hide Unzer Logo** — (*Yes* / *No*). Choose whether to hide the Unzer branding logo on the payment page.
* **Shop Name** — Specify a custom store name displayed in the header of the payment page.
* **Favicon** — Select a custom favicon via the Joomla Media Manager.
* **Logo Image** — Select your store logo image via Joomla Media Manager to display at the top of the payment page.
* **Background Image** — Select an optional background image for the payment page.
* **Header Color** — Hex color code for the header bar (e.g., `#1a56db`).
* **Background Color** — Hex color code for the payment page background (e.g., `#f8fafc`).
* **Footer Color** — Hex color code for the footer section (e.g., `#f1f5f9`).
* **Brand Color** — Hex color code for primary action buttons, highlights, and active accents (e.g., `#0284c7`).
* **Text Color** — Hex color code for typography (e.g., `#1e293b`).
* **Link Color** — Hex color code for hyperlinks (e.g., `#0284c7`).
* **Font** — Font family name for the payment page (e.g., `Arial`, `Roboto`, `Inter`).
* **Corner Radius (px)** — Border radius in pixels applied to input fields, buttons, and container cards (e.g., `6` or `12`).

#### Webhook Notice

The plugin automatically registers webhook endpoints via the Unzer API during the first checkout transaction. The registered webhook URL handles notifications for completed and canceled payments:

```
index.php?option=com_phocacart&view=response&task=response.paymentwebhook&type=unzerhpp&tmpl=component&pid={payment_id}
```

Incoming webhook requests are validated against the configured **Public API Key** to ensure authenticity before order statuses are updated.
