> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/payments/integrations/providers/mollie.md).

# Mollie

Connect Mollie to Payments — keys, webhook URL and signing secret.

Mollie takes cards and European local payment methods. Norbix gets Mollie's signed (next-gen) webhooks — they cover payment links and disputes.

## Get your credentials

1. Sign in to the [Mollie Dashboard](https://my.mollie.com/).
2. Open **Developers → API keys** and copy the test key (`test_…`) or the live key (`live_…`) (see [Authentication](https://docs.mollie.com/reference/authentication)).
3. Note the website profile id (`pfl_…`) of the profile you sell from (see [Get current profile](https://docs.mollie.com/reference/get-current-profile)).
4. Save the integration in Cloud once (below) to get its **Webhook URL**.
5. Open **Developers → Webhooks**, create a next-gen webhook with the webhook URL and the events, and copy its **signing secret** (see [Webhooks](https://docs.mollie.com/reference/webhooks-new)) into **Webhook Signing Secret**. Type the API key again and **Save**.

## Connect it in Cloud

**Where:** Payments → Integrations → **Add New Integration** → Mollie → **Connect** · `/projects/<project>/payments/integrations/new/mollie`

| Field                  | Required | What it does                                                                                                                                      | Example       |
| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| Profile ID             | yes      | Your Mollie website profile.                                                                                                                      | `pfl_…`       |
| API Key                | yes      | Lets Norbix call Mollie. Secret; encrypted on save and never shown again — type it again whenever you press **Save**.                             | `test_…`      |
| Webhook Signing Secret | no       | Checks the `X-Mollie-Signature` header — needed for payment triggers. It is shown as plain text while you type and is not shown again after save. | `whsec_…`     |
| Test Mode              | no       | **Enable test mode** to use Mollie's test environment.                                                                                            | on            |
| Integration Name       | yes      | The name in your integrations list.                                                                                                               | `Mollie test` |

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-2221229195ad23679771cf9d53fd7176974819af%2Fmollie-form-1.png?alt=media" alt="New Mollie Integration form filled with example values"><figcaption><p>The filled form (placeholder values).</p></figcaption></figure>

Press **Save**. The page turns into **Editing Mollie integration** with the badges **ENABLED**, **NOT TESTED**, **NOT CONFIRMED**, the integration id (`int_5uCC0PAguuuKiE0xaP3qqh`) and the **Webhook URL** — `<Hub address>/v3/payments/webhooks/<account id>/<project id>/mollie/<integration id>`; outside PROD it ends with `?env=<ENV>`. Copy it with its copy button and paste it at Mollie (see **Get your credentials**). **Received webhooks** at the bottom lists every call Mollie makes to it.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-39a96149e06ef4438260a3b841d2e45b7d5f6265%2Fmollie-saved-2.png?alt=media" alt="Editing Mollie integration after Save: ENABLED, NOT TESTED, NOT CONFIRMED, the integration id and the Webhook URL"><figcaption><p>After save: the webhook URL to paste at Mollie.</p></figcaption></figure>

Events Norbix accepts from Mollie (pick them at Mollie and in your [trigger](/codemash/cloud/payments/triggers/new.md)): `payment-link.paid`, `dispute.created`, `dispute.resolved`.

{% hint style="info" %}
Plain Mollie payment status calls (the `webhookUrl` of a single payment) are not signed, so Norbix does not accept them — only the next-gen webhook events above.
{% endhint %}

## Test and set as default

**Test integration** signs in to Mollie with the API key. With the made-up key of this example it failed: *Mollie authentication failed for integration int\_5uCC0PAguuuKiE0xaP3qqh: HTTP 400 Bad Request*. See [Test an integration](/codemash/cloud/payments/integrations/test.md). Payments has no default integration — every enabled integration gets its own calls ([Default integration](/codemash/cloud/payments/integrations/set-default.md)).

## Common errors

| Message                                                   | Cause                                                        | Fix                                                               |
| --------------------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------- |
| Mollie authentication failed … HTTP 400 Bad Request / 401 | Wrong API key.                                               | Copy the key again (test or live), type it, **Save**, test again. |
| **Received webhooks** shows **400**                       | The signing secret is empty or not the one of the webhook.   | Copy the signing secret again and **Save**.                       |
| Required                                                  | A required field is empty — secrets count too on every save. | Fill the field; type every secret again before **Save**.          |

## Do it from code

```ts
const { id } = await norbix.hub.payments.savePaymentsIntegration({
  integration: {
    provider: 'Mollie',
    integrationName: 'Mollie live',
    isEnabled: true,
    profileId: 'pfl_your_profile',
    apiKey: 'live_your_api_key',
    webhookSigningSecret: 'whsec_your_secret',
    isTestMode: false,
  } as any, // the TS type knows only the shared fields
});
console.log(id); // int_…
```

```sh
norbix hub payments integration save --integration '{"provider":"Mollie","integrationName":"Mollie live","isEnabled":true,"profileId":"pfl_your_profile","apiKey":"live_your_api_key","webhookSigningSecret":"whsec_your_secret","isTestMode":false}'
```

The client setup is on the [Payments page](/codemash/cloud/payments.md#use-it-from-code). API: [Save Payments Integration](/codemash/api-reference/payments/integrations/save-payments-integration.md)
