# Mollie Payment Extension

## <mark style="color:red;">**Extension Installation**</mark>

### <mark style="color:red;">**Preliminary Works**</mark>

The following information is requested from the provider for the brand-specific and production (live) environment.

* **API\_URL**
* **API\_KEY**

A secret\_key is generated with a minimum length of 41 characters. The generated key must be kept throughout the installation. An example command line to generate a random key:

```
openssl rand -base64 41
```

A hash\_key must also be generated with a minimum length of 32 characters. The generated key must be kept throughout the installation.

### <mark style="color:red;">**Environment Variables**</mark>

The extension installed to the relevant project in ACC must have the following environment variables. Environment variables can be entered before or after the deployment phase. As changes are made to the environment variables, the deployment process must be performed again.

| Variable           | Description                                                                           |
| ------------------ | ------------------------------------------------------------------------------------- |
| Extension-specific |                                                                                       |
| API\_URL           | URL received during the preliminary works phase (without a trailing slash at the end) |
| API\_KEY           | API Key received during the preliminary works phase                                   |
| WEBHOOK\_URL       | *https\://{SHOP\_URL}/orders/hooks/payment*                                           |
| Generic            |                                                                                       |
| SECRET\_KEY        | The generated secret key during the preliminary works phase                           |
| HASH\_KEY          | The generated hash key during the preliminary works phase                             |
| ADMIN\_EMAIL       | The e-mail address of the installer can be entered                                    |
| ADMIN\_PASSWORD    | A newly created and extension-specific strong password                                |
| ADMIN\_USERNAME    | A username can be entered (example: ‘akinon’)                                         |

## <mark style="color:red;">**Omnitron Settings**</mark>

The installed extension must also be defined to the project via Omnitron. This can be done on the **Payment Options & Add/Edit POS Integration** pages. After the settings are completed, it will be accessible under a new tab on the payment screen as it is a redirection type payment integration.

### <mark style="color:red;">**Payment Options**</mark>

One payment option must be defined in Omnitron to be specific for the extension installed. Explanations on how the settings should be made at this stage are in the table below.

| Field               | Description            |
| ------------------- | ---------------------- |
| Payment Option      | Redirect to bank       |
| Payment Option Name | Mollie                 |
| Payment Option Slug | mollie                 |
| Config\*            | {"pos\_slug":"mollie"} |

{% hint style="info" %}
Fields other than pos\_slug should be determined according to the requirements.
{% endhint %}

### <mark style="color:red;">**POS Integration**</mark>

One POS integration must be defined in Omnitron to be specific for the extension installed. Explanations on how the settings should be made at this stage are in the table below.

| Field        | Description                                               |
| ------------ | --------------------------------------------------------- |
| Name         | Mollie                                                    |
| Slug         | mollie                                                    |
| Gateway      | Extension                                                 |
| Resource URL | EXTENSION URL                                             |
| Username     | ADMIN\_USERNAME value in environment variables            |
| Password     | ADMIN\_PASSWORD value in environment variables            |
| Hash Key     | The generated hash key during the preliminary works phase |
| Payment Type | Auth                                                      |

## <mark style="color:red;">**Webhook**</mark>

No additional configuration is required to use webhooks with the Mollie Payment Extension. Payment transactions processed through the Mollie Payment Extension will automatically generate a webhook registration for that transaction.

[Webhook API Docs](https://docs.mollie.com/reference/webhooks)

## <mark style="color:red;">**Additional Notes**</mark>

Useful links:

* [Mollie Docs](https://docs.mollie.com/docs/getting-started)
* [Mollie API Reference](https://docs.mollie.com/reference/overview)
* [Backoffice](https://my.mollie.com/dashboard)
