#jhjhjhb-express-prefill

1 messages · Page 1 of 1 (latest)

hardy thorn
#

You can prefill this information via the account API before sending you user to the account link for onboarding

haughty acorn
#

Account is still restricted

hardy thorn
#

That's different than what you asked - have you/they provided all the required info?

haughty acorn
#

yes

#

hey?

hardy thorn
#

Can you provide more detail here? What's the account id of the conencted account?

#

Are you sure there are no more requirements when you inspect your account.updated webhooks?

haughty acorn
#

acct_1Jf1tM4Ez4Ooavh4

#

those are test accounts is that problem?

#

public String test() throws StripeException {
Stripe.apiKey = "";

    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", "express");
    params.put("country", "DE");
    params.put("email", "jenny.rosen@example.com");
    params.put("business_type", "company");
    params.put("capabilities", capabilities);

    Map<String, Object> externAccount = new HashMap<>();
    externAccount.put("object", "bank_account");
    externAccount.put("country", "DE");
    externAccount.put("currency", "EUR");
    externAccount.put("account_number", "DE55370400440532014000");
    params.put("external_account", externAccount);

    Account account = Account.create(params);

    AccountLinkCreateParams params1 =
            AccountLinkCreateParams.builder()
                    .setAccount(account.getId())
                    .setRefreshUrl("https://example.com/reauth")
                    .setReturnUrl("https://example.com/return")
                    .setType(ACCOUNT_ONBOARDING)
                    .build();

    AccountLink accountLink = AccountLink.create(params1);

    return accountLink.getUrl();
}
#

this is code snippet

hardy thorn
#

you should edit that to remove your test secret key

#

and roll that key

haughty acorn
#

yes my fault

hardy thorn
#

ty for removing 🙂

hardy thorn
#

Are you sure that's the right account id? There are many unsatisfied requirements for that account

hardy thorn
#

You should double check that all information has been provided by checking the account requirements

#

but for express this is mostly managed by Stripe for you, and your account holder needs to provide the info