Home > Software design >  How to prefill Mobile Number, Type of business in stripe express onboarding?
How to prefill Mobile Number, Type of business in stripe express onboarding?

Time:10-29

Can I prefill the Mobile Number? as I have prefilled the Email

Unable to refill Mobile Number

Can I prefill the Type of business? as I have prefilled the Country

Unable to prefill Type of business

Unable to prefill phone number, Type of business in stripe onboarding express account. But other fields are prefilling except these fields. I have referred: https://stripe.com/docs/api/accounts/update?lang=java to update accounts API

    Map<String, Object> addressParams = new HashMap<>();
    addressParams.put("country", "AU");
    if (accountInfo.get("companyAddressLine1") != null)
    addressParams.put("line1", accountInfo.get("companyAddressLine1"));
    if (accountInfo.get("companyAddressLine2") != null)
    addressParams.put("line2", accountInfo.get("companyAddressLine2"));
    if (accountInfo.get("companyAddressCity") != null)
    addressParams.put("city", accountInfo.get("companyAddressCity"));
    if (accountInfo.get("companyAddressState") != null)
    addressParams.put("state", accountInfo.get("companyAddressState"));
    if (accountInfo.get("companyAddressPostalCode") != null)
    addressParams.put("postal_code", accountInfo.get("companyAddressPostalCode"));

    Map<String, Object> companyParams = new HashMap<>();
    companyParams.put("address", addressParams);
    if (accountInfo.get("companyPhone") != null)
    companyParams.put("phone", accountInfo.get("companyPhone"));
    if (accountInfo.get("abnNumber") != null)
    companyParams.put("tax_id", accountInfo.get("abnNumber"));
    if (accountInfo.get("companyName") != null)
    companyParams.put("name", accountInfo.get("companyName"));

    Map<String, Object> businessProfileParams = new HashMap<>();
     businessProfileParams.put("support_address", addressParams);
    businessProfileParams.put("product_description","test");

    Map<String, Object> params = new HashMap<>();
    params.put("business_type", "company");
    if (accountInfo.get("companyEmail") != null)
    params.put("email", accountInfo.get("companyEmail"));
    params.put("business_profile", businessProfileParams);
    params.put("company", companyParams);

    Account updatedAccount = account.update(params);

CodePudding user response:

The phone and email input in the screenshot is used for Express authentication and is associated with the User on the account. The platform cannot pre-fill this User data. The phone & email which the you have pre-filled using the Accounts API is associated with the company/business on this account.

Yes, you should be able to prefill the type of business. I'd suggest retrieving the connected account to verify if the business_type has been set before creating the onboarding link.

  • Related