Home > Software design >  Can I prefill Mobile number field in stripe express Onboarding?
Can I prefill Mobile number field in stripe express Onboarding?

Time:10-29

Can I prefill the Mobile number field in stripe express Onboarding? Image

This is my code, Here I am able to prefill all fields except phone number. I have tried 43 0000000000, 0000000000, 000-000-0000 combinations for phone number

 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("companyName") != null)
            companyParams.put("name", accountInfo.get("companyName"));
        if (accountInfo.get("companyPhone") != null)
        companyParams.put("phone", " 43 0000000000");
        companyParams.put("structure", "private_corporation");


        Map<String, Object> businessProfileParams = new HashMap<>();
         businessProfileParams.put("support_address", addressParams);
        businessProfileParams.put("product_description","test");
        if (accountInfo.get("companyPhone") != null)
        businessProfileParams.put("support_phone"," 43 0000000000");
        if (accountInfo.get("companyEmail") != null)
        businessProfileParams.put("support_email",accountInfo.get("companyEmail"));

        Map<String, Object> params = new HashMap<>();
        params.put("business_type", COMPANY_TYPE);
        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.

  • Related