0
votes

I'm experimenting with stripe connect

what I'm doing is when a vendor is created on my platfom I also create a stripe connect account for him

stripe.accounts.create({type: 'custom', country:'IT'})

then I ask the new user to complete the activation process and update the account https://stripe.com/docs/api/accounts/update

stripe.accounts.update(id, req.body);

where req.body is (in case of an individual account)

{"business_type":"individual",
 "company":null,
 "individual":{
     "first_name":"Sam",
     "last_name":"Morrison",
     "address":{
         "city":"Bergamo",
         "line1":"Via Dipinta,5",
         "postal_code":"24129"
     },
     "dob":{ "year":"1979", "month":"03", "day":"14" }
  }
}

but I get an error response that indicate

Received unknown parameter: business_type"
1
What API version are you using? The structure of Connect changed significantly with 2019-02-19 --- if you're using a version before that it'll be different and you may want to upgrade. stripe.com/docs/upgrades#2019-02-19 - duck
Updated to 2019-03-14 stripe.setApiVersion('2019-03-14'); and works as expected! Thanks - Gavello
Hey could you share with me the docs where says how to create an account via API as you are doing? I only can create them via a form. - Alejandro Paredes

1 Answers

1
votes

As pointed out by @duck

stripe.setApiVersion('2019-03-14');

solve the issue!