Skip to content


The JustOn Self-Service Extension can integrate with Mollie as a payment provider. It uses Mollie Checkout and Mollie Webhooks to implement the payment procedure.

Be aware of the following specifics:

  • The Checkout page supports all payment methods that are enabled in the Mollie Dashboard. Payment methods that are not allowed for a given payment operation, like due to an amount limit or an unsupported currency, are not shown.
  • JustOn passes the same language code that is used for the payment page to Mollie Checkout. Mollie supports a subset of ISO 15897 locales. If the current language is not supported, the language code is not passed to Mollie.
Future payments with Mollie

When using future payments, the invoice field Email Contact must be set.

The payment will fail if future payment is selected but the field Email Contact is not set on the invoice. In this case, JustOn creates a Payment Entry record that holds the information about the failure in the field Provider Specific Data.

With the first executed payment, the Mollie integration creates a Mollie customer. The ID of the customer is stored in the contact field Mollie Customer Id. The Mollie customer ID will be used for all subsequent payments. This way, a payment is always assigned to the same Mollie customer. If you delete the customer in the Mollie Dashboard, JustOn automatically creates a new customer when future payment is selected.

JustOn uses the following billing information fields on the invoice when creating a Mollie customer for future payments: Email First Name, Email Last Name, Email.

JustOn recommends to make these fields editable and mandatory. This forces the user to specify missing data.

This data is passed to Mollie Checkout. Its application depends on the selected payment method. For example, Mollie uses the email address with bank transfers to send payment information to the customer.

If you intend to use direct debit for recurring payments, you must enable at least two payment methods in Mollie:

  • For the first payment, enable one of the first payment methods that create a direct debit mandate, currently including Bancontact, Belfius Payment Button, EPS, Giropay, iDEAL, ING Home'Pay, KBC/CBC Payment Button and SOFORT Banking. For details, see Setting up the first payment in the Mollie documentation.
  • For the subsequent payments, enable SEPA Direct Debit.
Mollie webhook URL

The JustOn Self-Service Extension automatically builds the webhook URL to be called. It is transferred with every payment request.

The URL is composed of

  • the secure site URL of your Salesforce Site,
  • the path /services/apexrest/ONBSE1/MollieWebhook, and
  • your Mollie profile ID, like

The payment records in your Mollie Dashboard show the webhook URL.


As opposed to the usual payment workflow (see Payment Page), the Mollie integration creates a payment balance, setting the corresponding invoice Paid, upon issuing the payment request without waiting for a success notification. If the payment processing fails, the Mollie integration triggers JustOn to delete the payment balance and to set the invoice Open again.

Setting up Mollie as a payment provider involves the following tasks:

Creating Mollie Account

In order to use Mollie as a payment provider, you need a valid Mollie account. To create it, navigate to the Mollie website, click Sign up and follow Mollie's instructions.

To configure the integration with the JustOn Self-Service Extension, you need the API key and Profile ID. Find these values in your Mollie Dashboard.

Enabling Mollie Webhook Handler

As part of the payment-specific site setup, you must enable the specific Apex class ONBSE1.MollieWebhookHandler for your site in order to completely support the Mollie integration.

  1. Open the Site Details of your site.

    Type Sites in the Quick Find box, or navigate to User Interface > Sites and Domains > Sites. In the Sites list, click the label of the site to open its details.

  2. Click Public Access Settings to open the site profile.

  3. In the Original Profile User Interface, scroll to the Enabled Apex Class Access section, and then click Edit.

    If you use the Enhanced Profile User Interface, click Apex Class Access > Edit.

  4. Add the Apex class ONBSE1.MollieWebhookHandler to the Enabled Apex Classes list.

  5. Click Save.

Configuring Mollie Integration


The Mollie integration requires the Visualforce page ONBSE1.PaymentMollie added to your site. For details, see Assigning Payment-Specific Pages.

To configure the Mollie integration with the JustOn Self-Service Extension:

  1. Open the Payment Provider Setup page.

    Open the Payment Provider Setup page directly, or navigate to Custom Code > Visualforce Pages > PaymentProviderSetup in Setup, and open the preview.

  2. Select the payment provider and click New to create a new setting, or click Edit next to an existing setting to modify it.

    You can create one active payment provider setting per business entity and payment provider. Before creating a new setting for an entity/provider combination that already exists, you must deactivate the existing setting.

  3. Select the business entities for which the setting is applicable.

    If there is no business entity selected, this setting is used by default for all business entities.

  4. Specify a name for this configuration setting.

    Make sure to use a descriptive name that helps to unequivocally identify the configuration setting.

  5. Specify the provider-specific configuration.

    Field Required Notes
    API Key The secret API key of the test or live environment. Can be obtained from the Mollie profile.
    Profile ID The Mollie profile ID. A payment provider setting with this profile ID must exist.
    Site Hostname The secure site URL of your Salesforce Site without trailing slash, like https://<instance>
    Make sure to use the site URL, not the domain URL.
    Enable Future Payments Select this checkbox if you want to enable the future payments feature. When checked, the future payment option is shown after confirming the Mollie payment form, allowing the user to opt for it.
    Future Payments Active Select this checkbox if you want to activate the future payments feature by default. This creates a corresponding payment instrument, which is saved on the account.
    JustOn recommends to activate this setting in combination with Future Payments Changeable to allow users to opt out.
    Future Payments Changeable Select this checkbox if you want users to be able to override the Future Payments Active value in the payment form.
    Be aware that this setting has no effect once users have opted to use future payments. If required or on users' request, you deactivate individual payment instruments manually.

    When editing existing configurations, API Key and Profile ID values are not displayed. The values remain unchanged as long as you leave the corresponding fields empty.

  6. Click Add for new settings or, respectively, Save for existing settings.

Using Future Payments Without Initial Payment

Your business may require to create payment balances with Mollie during the payment run without an initial payment. This requires payment instruments to be available.


The payment instrument creation is project-specific and therefore not covered with this documentation. Generally, you can

  • Create payment instruments manually,
  • Use automation tools like Salesforce processes to have payment instruments created automatically, or
  • Use a Salesforce API (REST, SOAP, Dataloader, Apex) to insert Payment Instrument records

The following payment instrument fields must be set:

Field Label API Name Description Value
Account ONB2__Account__c The associated Salesforce account ID of this payment instrument. Salesforce account ID, like 0011t000007Lk1xAAC
Payment Provider ONB2__PaymentProvider__c The payment provider that handles this payment instrument. Mollie
Provider Specific Data ONB2__ProviderSpecificData__c JSON encoded values needed for the specific payment provider. Mollie customer ID
Mollie mandate ID
Mollie profile ID
Type ONB2__Type__c The payment instrument type. Mollie

The field Provider Specific Data must contain the following JSON keys:

Key Description
customerId The ID of the customer for whom the payment is being created.
mandateId The ID of a specific mandate must be supplied to indicate which of the consumer's accounts are to be credited.
profileId The Mollie profile ID. A payment provider setting with this profile ID must exist.

Example for Provider Specific Data:

 "customerId": "cst_kEn1PlbGa",
 "mandateId": "mdt_h3gAaD5zP",
 "profileId": "pfl_beqeERw3jM"