Reputation: 1068
I was trying to implemented stripe payment gateway. Every thing is going fine. I was able to create connected account for the user in my stripe dashboard, but the problem is I'm missing following parameter
Now I want to know how to add these parameters while creating account.
I have add the screen shot from stripe dashboard and here is the code:
Map<String, Object> dob =
new HashMap<>();
dob.put("day", "12");
dob.put("month", "1");
dob.put("year", "1991");
Map<String, Object> address =
new HashMap<>();
Map<String, Object> address_pram =
new HashMap<>();
address_pram.put("city", "Baton Rouge");
address_pram.put("line1", "1 Calais Ave");
address_pram.put("postal_code", "70806");
address_pram.put("state", "Louisiana");
address.put("address", address_pram);
address.put("dob", dob);
address.put("email", "[email protected]");
address.put("first_name", "ahmad");
address.put("last_name", "bajwa");
address.put("phone", "+12015551023");
//address.put("website", "www.goldenkeystone.com");
//address.put("industry", "");
// address.put("ssn", "000000000");
Map<String, Object> acceptance =
new HashMap<>();
acceptance.put("date", System.currentTimeMillis() / 1000L);
acceptance.put("ip", ipString);
Map<String, Object> cardPayments =
new HashMap<>();
cardPayments.put("requested", true);
Map<String, Object> transfers = new HashMap<>();
transfers.put("requested", true);
Map<String, Object> capabilities =
new HashMap<>();
capabilities.put("card_payments", cardPayments);
capabilities.put("transfers", transfers);
Map<String, Object> params = new HashMap<>();
params.put("type", "custom");
params.put("country", "US");
params.put("tos_acceptance", acceptance);
params.put("business_type", "individual");
params.put("individual", address);
params.put("capabilities", capabilities);
Account account = Account.create(params, requestOptions);
Note: If still question is unclear, I would be glad if you add your contribution.
Upvotes: 1
Views: 209
Reputation: 5847
That data and other sensitive information would be collected by Stripe during the onboarding via Account Links: stripe.com/docs/connect/connect-onboarding
It's not something that you can pass to the Accounts API. See here for more information: https://stripe.com/docs/connect/collect-then-transfer-guide?platform=web#create-an-account-link
Upvotes: 1