Create client link¶
Note
The Client Links API is in closed beta and only available to selected partners. Please contact your partner manager / partners@mollie.com if you want to implement this.
POST
https://api.mollie.com/v2/client-links
Link a new or existing organization to your OAuth application, in effect creating a new client. The response contains a clientLink
where you should redirect your customer.
You can find more information on how to implement the Create Client Link API here.
Parameters¶
owner
objectrequiredPersonal data of your customer which is required for this endpoint.
email
stringrequiredgivenName
stringrequiredfamilyName
stringrequiredlocale
stringoptionalAllows you to preset the language to be used in the login / authorize flow. When this parameter is omitted, the
browser language will be used instead. You can provide any xx_XX
format ISO 15897 locale, but the authorize flow
currently only supports the following languages:
Possible values: en_US
nl_NL
nl_BE
fr_FR
fr_BE
de_DE
es_ES
it_IT
name
stringrequiredaddress
address objectrequiredAddress of the organization. Note that the country
parameter must always be provided.
streetAndNumber
stringconditionalpostalCode
stringconditionalcity
stringconditionalcountry
stringrequiredregistrationNumber
stringoptionalvatNumber
stringoptionalThe VAT number of the organization, if based in the European Union or the United Kingdom.
Example: NL123456789B01
Parameters for the clientLink
link¶
The clientLink
link takes a subset of the parameters allowed for the Authorize endpoint:
client_id
, state
, approval_prompt
and scope
.
Note
At a minimum, we recommend you request onboarding.read onboarding.write
and any scopes required for
orders or payments you want to create. onboarding.read
is required if you wish to follow the onboarding
progress via the Get onboarding status endpoint
or Mollie Dashboard.
Example¶
1 | https://my.mollie.com/dashboard/client-link/cl_vZCnNQsV2UtfXxYifWKWH?client_id=app_j9Pakf56Ajta6Y65AkdTtAv&state=decafbad&scope=onboarding.read+organizations.read+payments.write+payments.read+profiles.write |
In case of an invalid value, your customer will be redirected to the redirect URI set for your OAuth application with
the error
and error_description
query parameters added.
Example¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | curl -X POST https://api.mollie.com/v2/client-links \ -H "Content-Type: application/json" \ -H "Authorization: Bearer access_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" \ -d '{ "owner": { "email": "norris@chucknorrisfacts.net", "givenName": "Chuck", "familyName": "Norris", "locale": "en_US" }, "address": { "streetAndNumber": "Keizersgracht 126", "postalCode": "1015 CW", "city": "Amsterdam", "country": "NL" }, "name": "Mollie B.V.", "registrationNumber": "30204462", "vatNumber": "NL815839091B01" }' |
1 2 3 4 | We don't have a PHP code example for this API call yet. If you have some time to spare, feel free to share suggestions on our Discord: https://discord.gg/VaTVkXB4aQ |
1 2 3 4 | We don't have a Python code example for this API call yet. If you have some time to spare, feel free to share suggestions on our Discord: https://discord.gg/VaTVkXB4aQ |
1 2 3 4 | We don't have a Ruby code example for this API call yet. If you have some time to spare, feel free to share suggestions on our Discord: https://discord.gg/VaTVkXB4aQ |
1 2 3 4 | We don't have a Node.js code example for this API call yet. If you have some time to spare, feel free to share suggestions on our Discord: https://discord.gg/VaTVkXB4aQ |
Response¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | HTTP/1.1 201 Created Content-Type: application/hal+json; charset=utf-8 { "id": "cl_vZCnNQsV2UtfXxYifWKWH", "resource": "client-link", "_links": { "clientLink": { "href": "https://my.mollie.com/dashboard/client-link/cl_vZCnNQsV2UtfXxYifWKWH", "type": "text/html" }, "documentation": { "href": "https://docs.mollie.com/reference/v2/clients-api/create-client-link", "type": "text/html" } } } |