Need help Stripe custom accounts creation API

Hi everyone,

I need help to implement Stripe connect and create custom accounts for a marketplace located in France with the API connector, no plugins please.

The platform has merchant accounts that can sign up to create courses, and students accounts that can pay for the courses published by the merchants. Here is the need: I have developped a frontend interface where the user is required to put in:

-first and last name,
-date of birth, -
-file uploader to upload front copy of ID,
-another file uploader to upload back copy of ID,
-another file uploader to upload user’s proof of address.
-A button entitled “Create account”

The issue I am facing is how to configure the APIs once the “Create account button is clicked”. In the stripe jargon, account_type should be “individual”. Stripe says that in France users need to have a token created before their connect account is created. So I understand there are 4 steps with the following API POST calls:

This is how I have structured the first call:

With this I can initialize the call, but I am not sure what to put in the next call and I am getting an error when I try to initialize it as it is:

m

Can someone please help ?