Connect for Platforms: Getting started
How to get started
In this article we will go over the most common steps from signing up to getting started with Mollie Connect for Platforms.
Step 1: Setting up your application
When you set up an app in Mollie, it authenticates and links to the Mollie account it manages. This is done by adding an authorization header to your API requests which contains an access token, that tells Mollie the following:
- Who is making the request (the OAuth app related to your partner account).
- Which Mollie account is being accessed (your client’s Mollie account).
- Which permissions are granted (what actions you can perform on behalf of your partner's account; example here).
Below is an example API call to retrieve payment details. This request is sent to the Payments API endpoint and includes the transaction ID
(payments/tr_xxxxxxxxxxx
) to specify the payment you want to access:
curl -X GET https://api.mollie.com/v2/payments/tr_xxxxxxxxxx \
-H "Authorization: Bearer access_xxxxxxxxxxxxxxxxxx"
In response Mollie returns a JSON object containing payment details (pagination is applied).
In production, your server must be publicly accessible via HTTPS connection to ensure a secure data transmission.
For development or testing, you can utilize services like ngrok.com to create an SSL tunnel and expose your local server securely.
We recommend setting up API idempotency to avoid duplicated payments and ensure data consistency.
You can also use Webhooks to stay informed and automatically receive updates about changes to your Mollie account, rather than manually polling an API to check for updates.
Step 2: Configuring an OAuth app
Regardless of the use case, it is essential to start by understanding the OAuth, since Mollie Connect suite relies on it to manage all connected accounts.
OAuth is an open standard for access delegation, a prerequisite to benefit from the Mollie Connect product.
To support OAuth with your app, you must implement the OAuth authorization flow which starts with a Connect with Mollie button, and gives you an access token at the end so that your app is able to communicate with the Mollie API on behalf of your customers.
For many programming languages, open source packages are available with detailed instructions to help you implement the OAuth flow:
- Simple OAuth2 for Node.js
- The PHP League’s OAuth 2.0 client for PHP
- Authlib for Python (supporting common frameworks like Flask and Django)
- The official Python client (supporting OAuth out-of-the-box)
We will take a closer look at OAuth and how to set it up in the Setting up OAuth article.
Step 3: Linking and onboarding customers
You then need to onboard your new customers or link existing ones using Mollie Connect.
For the new Mollie customers, Mollie will need to conduct a verification process, known as KYC, however you can decide how your customers will complete this process, for example:
- Have them sign up individually and install your app later.
- Create an account on their behalf and let them complete the onboarding in the Mollie Web app and offer a co-branded onboarding experience in your app (using Client Links API).
Step 4: Managing customer accounts
After linking your customer accounts you need to ensure you understand how to manage them correctly and which APIs to use depending on your use case. This includes:
- Operating the OAuth App.
- Creating, managing and deleting profiles on behalf of your customers.
- Keeping track of account statuses during the onboarding.
- Managing payment methods enabled for a specific profile.
- Creating and monitoring payments etc.
Step 5: Processing payments
As a platform you will enable Mollie payments and process transactions on behalf of your customers.
Depending on the model which you choose to operate with, you will need to implement a specific set of features, for example:
- For the Platform model, we offer Application fees, where you platform can determine per each payment a fee which will be moved to your platform’s account balance whenever the payment succeeds.
Here’s how it works:
- Authorization: obtain a new access token by sending the refresh token from your database to the
/tokens
endpoint. - Profile setup: specify the profile
ID
for the client whose payment you’re processing. Use the Profiles API and the List Profiles to access your client’s profiles (requiresprofiles.read
scope). - Payment details: provide
description
,amount
, andredirectUrl
params for each transaction. Always check the status object using the Get payment API for accurate payment information due to security concerns. - Payment response: after creating a payment, Mollie returns several key details:
- ID: the transaction ID (store this in your system and link it to your own order/transaction ID).
- Status: current payment status (defaults to
open
).
If you have Webhooks set up, Mollie will notify you when the status changes. - Checkout: link to the checkout page where customers can complete their payment and then redirected to the
redirect URL
you provided).
- Customizing payment methods: by default, the checkout page shows all enabled payment methods of your client. You can limit these options on behalf of your clients using Methods API or by specify specific payment methods in the
method
parameter when creating the payment.
Step 6: Setting up reporting and dashboards
You can easily track and measure platform growth data in real-time using your Partner Dashboard along with your customers who get their own Mollie dashboard to track their performance.
Mollie also offers a variety of Business Operation APIs, which allow you to provide additional reporting service:
- Settlements API - reports all transactions of a customer, based on a settlement which represents a payout from Mollie balance to customer’s bank account.
- Balances API - reports all transactions in a bank feed format, allowing to retrieve also open and unsettled balances, which provides more optimal reconciliation.
- Invoices API - reports payment and other Mollie fees which the customer is charged with.
Step 7: Testing and going live
It’s essential to test the flow and ensure a smooth onboarding experience for your clients before going live. We recommend the following steps to check your setup:
- Generate a client link: use the Client Links API to create a test client link by providing sample customer data.
- Open the client link: open the client link to trigger an email to a test email address and create an account with the prefilled fields.
- Verify the Onboarding status: after completing the test onboarding, use the Capabilities API or your Web app to check the status of the onboarding process. Ensure that:
- The onboarding is marked completed (if all necessary details were provided).
- The onboarding status reflects steps that still need to be completed (If any information is missing).
You can find more information on testing and going live in our Go-live checklist.
Updated 3 days ago