#Vipudvp-Connect

1 messages · Page 1 of 1 (latest)

sweet coyote
pastel raft
#

I having code error,
Not able to create a bank for custom account for

Not able to set account holder for creating bank

sweet coyote
#

Or can you share with the detailed error message?

pastel raft
#

Yes Actually I not able to request, getting this above error before sending the request

sweet coyote
#

OK, seems like the AccountHolder property is missing in the SessionCreationParam

pastel raft
#

Getting error while setting account holder.

sweet coyote
#

How do you create the session, can you share with the code?

pastel raft
#

First I have retrieve the account object by passing account id
Then creating bank account sesssion

sweet coyote
#

Instead of type Account, you should pass a string to setAccount()

#

e.g., setAccount(userStripeAccount.accountId)

pastel raft
#

Okay got it.

#

Let me check with it

#

Still getting same error @sweet coyote

sweet coyote
#

Can you copy and paste your code here?

pastel raft
#

SessionCreateParams params2 = SessionCreateParams
.builder()
.setAccountHolder(
SessionCreateParams.AccountHolder
.builder()
.setType(SessionCreateParams.AccountHolder.Type.ACCOUNT)
.setAccount(userStripeAccount.accountId)
.build()
)
.setFilters(SessionCreateParams.Filters.builder().addCountry("US").build())
.addPermission(SessionCreateParams.Permission.OWNERSHIP)
.addPermission(SessionCreateParams.Permission.PAYMENT_METHOD)
.build();

     Session session = Session.create(params2);
     Map<String, Object> responseData = new HashMap<>();
    responseData.put("checkoutSessionId", session.getId());
    //return gson.toJson(responseData);
    render (responseData as JSON)
sweet coyote
#

Can you confirm if userStripeAccount.accountId returns a string?

pastel raft
#

Yes @sweet coyote

#

Its giving me exception at this point.SessionCreateParams.AccountHolder

sweet coyote
#

I'm not familiar with Groovy, but it seems like you are mixing Groovy code with Java code.

pastel raft
#

But groovy allowing me to use java code,
I have used lots of services of stripe
Like
Create coupouns, promotion codes and onetimepayment and subscription payment

sweet coyote
#

Is the code highlighted in red causing syntax error?

pastel raft
#

No, Its due to break point applied at that point

sweet coyote
#

Ok. I'd suggest you to break down your code

pastel raft
#

In What way..??

sweet coyote
#

AccountHolder accountHolder = SessionCreateParams.AccountHolder
.builder()
.setType(SessionCreateParams.AccountHolder.Type.ACCOUNT)
.setAccount(userStripeAccount.accountId)
.build()

#

Do this and see if you can successfully create the accountHolder

pastel raft
#

Okay

#

Its giving me compile time error

void prawn
#

Just taking over here, let me catch-up

pastel raft
#

Sure @void prawn

void prawn
#

What's the actually error? Looks like it's beneath the page break in your screenshot

pastel raft
#

Can you please refer above screenshots

void prawn
#

Which version of stripe-java are you using?

#

Was only released in 20.121.0

pastel raft
void prawn
#

Wait, you're using the Checkout class?

pastel raft
#

Yes

void prawn
#

It's not Checkout, but the financialConnections class

void prawn
#

@pastel raft Did that resolve it?

pastel raft
#

checking

pastel raft
#

In what version I will find financialConnections

#

I not getting here in list while import

void prawn
pastel raft
#

I able to generate a session of financial services
Now How can I redirect to dashboard of stripe to add bank details

pastel raft
#

I not able to get the id from the session object

sinful shoal
#

Sincere apologies for the delay, I'm jumping in as my teammate needed to step away and am working on getting caught up.

pastel raft
#

So,

I have we generate a session a session for create bank for custom account
But I not abe to redirect

#

I get the session and pass to stripe.redirectToCheckout

sinful shoal
#

Do you mind if we take a step back for a second, I'm trying to understand what you're trying to accomplish.

You're trying to use Financial Connections to establish a connection to the bank account for your Custom connected account?

pastel raft
#

Correct

sinful shoal
#

Gotcha, let me take a closer look at the flow for that.

pastel raft
#

Now I able to create a account I need to client secret to add the bank,

#

I was passing session id

sinful shoal
#

Ah gotcha, glad to hear you figured it out.