//native
type Mollie = {
token: string;
};
/**
* Get onboarding status
* Retrieve the onboarding status of the currently authenticated organization.
> 🔑 Access with
>
> Access token with **onboarding.read**
*/
export async function main(auth: Mollie) {
const url = new URL(`https://api.mollie.com/v2/onboarding/me`);
const response = await fetch(url, {
method: "GET",
headers: {
Authorization: "Bearer " + auth.token,
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.text();
}
Submitted by hugo697 428 days ago