Retrieve the onboarding status of the currently authenticated organization.
import { Client } from "mollie-api-typescript";
const client = new Client({
security: {
advancedAccessToken: process.env["CLIENT_ADVANCED_ACCESS_TOKEN"] ?? "",
},
});
async function run() {
const result = await client.onboarding.get({
idempotencyKey: "123e4567-e89b-12d3-a456-426",
});
console.log(result);
}
run();The standalone function version of this method:
import { ClientCore } from "mollie-api-typescript/core.js";
import { onboardingGet } from "mollie-api-typescript/funcs/onboardingGet.js";
// Use `ClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const client = new ClientCore({
security: {
advancedAccessToken: process.env["CLIENT_ADVANCED_ACCESS_TOKEN"] ?? "",
},
});
async function run() {
const res = await onboardingGet(client, {
idempotencyKey: "123e4567-e89b-12d3-a456-426",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("onboardingGet failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetOnboardingStatusRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<models.EntityOnboardingStatus>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 429 | application/hal+json |
| errors.ClientDefaultError | 4XX, 5XX | */* |
Submit data that will be prefilled in the merchant's onboarding. The data you submit will only be processed when the
onboarding status is needs-data.
Information that the merchant has entered in their dashboard will not be overwritten.
import { Client } from "mollie-api-typescript";
const client = new Client({
security: {
advancedAccessToken: process.env["CLIENT_ADVANCED_ACCESS_TOKEN"] ?? "",
},
});
async function run() {
await client.onboarding.submit({
idempotencyKey: "123e4567-e89b-12d3-a456-426",
requestBody: {
organization: {
name: "Mollie B.V.",
address: {
streetAndNumber: "Keizersgracht 126",
postalCode: "1015 CW",
city: "Amsterdam",
country: "NL",
},
registrationNumber: "30204462",
vatNumber: "NL815839091B01",
vatRegulation: "dutch",
},
profile: {
name: "Mollie",
url: "https://www.mollie.com",
email: "info@mollie.com",
phone: "+31208202070",
description: "Payment service provider",
businessCategory: "MONEY_SERVICES",
},
},
});
}
run();The standalone function version of this method:
import { ClientCore } from "mollie-api-typescript/core.js";
import { onboardingSubmit } from "mollie-api-typescript/funcs/onboardingSubmit.js";
// Use `ClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const client = new ClientCore({
security: {
advancedAccessToken: process.env["CLIENT_ADVANCED_ACCESS_TOKEN"] ?? "",
},
});
async function run() {
const res = await onboardingSubmit(client, {
idempotencyKey: "123e4567-e89b-12d3-a456-426",
requestBody: {
organization: {
name: "Mollie B.V.",
address: {
streetAndNumber: "Keizersgracht 126",
postalCode: "1015 CW",
city: "Amsterdam",
country: "NL",
},
registrationNumber: "30204462",
vatNumber: "NL815839091B01",
vatRegulation: "dutch",
},
profile: {
name: "Mollie",
url: "https://www.mollie.com",
email: "info@mollie.com",
phone: "+31208202070",
description: "Payment service provider",
businessCategory: "MONEY_SERVICES",
},
},
});
if (res.ok) {
const { value: result } = res;
} else {
console.log("onboardingSubmit failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.SubmitOnboardingDataRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<void>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 429 | application/hal+json |
| errors.ClientDefaultError | 4XX, 5XX | */* |