#XinJin

1 messages ยท Page 1 of 1 (latest)

carmine ridge
#

Client IP. It's the IP of the account holder's device (the one they used to view and accept the terms).

fiery frigate
#

If I set it randomly.

#

Then it will affect to payouts?

carmine ridge
#

Randomly? That would be a violation of the Stripe terms of service I believe, as you're providing falsified information. Why would you set it to something random?

fiery frigate
#

Ok. I will use the client ip address.

#

When I creating stripe connect account.

#

and attach external account,

#

which webhook event

#

accounts for final confirmation to verify all?

carmine ridge
#

Verify all of what?

fiery frigate
#

stripe connect account verification process.

carmine ridge
#

You probably want account.updated.

fiery frigate
#

I was getting

#

several account.updated.

#

although I submit all information at once.

#

and create the external account.

carmine ridge
#

Sorry, not sure I understand. Do you have a question? Getting lots of account.updated events is normal.

fiery frigate
#

Yeah.

#

I want to

#

get event of final account.update

#

At that point,

#

I need to do some actions.

carmine ridge
#

One thing I want to clarify: based on some of the questions you've asked here it sounds like you're trying to bypass/hide/skip some of the required information collection and account verification steps. I strongly encourage you to not try to do that. If you do anything like that it's likely your account will be flagged and possibly suspended, and your connected account holders will not have a good time.

fiery frigate
#

No I am getting data from users.

carmine ridge
#

That's great! Just wanted to make sure you have a good experience. ๐Ÿ™‚

fiery frigate
#

And submit them at once.

#

And I want to know final webhook event.

carmine ridge
#

It's account.updated.

#

You need to examine the content of the event to determine the disposition of the account.

fiery frigate
#

when creating stripe connect account,

#

can I add additional data?

#

such as userId of whom the user created

#

So, in webhook event,

carmine ridge
fiery frigate
#

I want to get that.

#

Ok.

#

The webhook event, as I checked,

#

sometimes I got external_accouont.created

#

event in last time

#

and in another case,

#

account.updated

carmine ridge
#

That event is specific to the external account being created, not the connected account itself.

fiery frigate
#

Occurs whenever an account status or property has changed.

#

account status,

#

If I know the final account status,

#

I can determine if this is last event or not, I think.

carmine ridge
#

There is no "final" account status. Accounts are dynamic entities and may change their status over time.

#

It's not as simple as checking a single property on the account and then ignoring future updates/events.

fiery frigate
#

Ok, I will see in detail. Thank you.

#

And when creating paymentIntent,

#

can I add meta data, too?

carmine ridge
#

Yep. Metadata is available on many Stripe objects. You can check the API reference to see if an object has a metadata property or not.

fiery frigate
#

And after i added external account,

#

I want to update a new external account.

#

with different card.

#

But seems it is not possible.

carmine ridge
fiery frigate
#

I am going to use this method.

carmine ridge
#

Did you have a question about that code?

fiery frigate
#

I created with

#

bank account token.

#

So I want to update this token with new.

#

But the body type

#

doesn't say like that.

carmine ridge
#

Did you get an error?

fiery frigate
#

Type is not allowed.

#

because it is in typescript.

carmine ridge
#

You're not supplying the correct arguments. updateExternalAccount takes the account ID, then the ID of the new external account, not an object.

#

In other words, you're skipping over id there and going to params.

fiery frigate
#

The id should be new token?

carmine ridge
#

Yes.

fiery frigate
#

I tried in that way.

#

But getting this error.

carmine ridge
#

Can you copy and paste that tok_ ID here, and also give me the connected account's ID?

fiery frigate
#

Ok.

#

tok_1JXuz9IqjQenjcYZXBgwo4d6

carmine ridge
#

That Token exists on your platform account, not on the connected account, which is why you're getting the error message.

fiery frigate
#

On frontend side,

#

I am using the stripe api key

#

And creating payment token

#

And added to the created stripe connect account.

#

Is this wrong logic?

carmine ridge
#

Are you initializing Stripe.js with the connected account's ID?

#

Like this?

var stripe = Stripe('{{PLATFORM_PUBLISHABLE_KEY}}', {
  stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
});
fiery frigate
#

When creating stripe external_account,

#

I must initialize the stripe in that way, too?

carmine ridge
#

When creating a Token you want to attach to a connected account as their external account you need to create that Token on the connected account, not on your platform account.

#

If you're using Stripe.js to create the Token you need to initialize it with your platform account's publishable key and the connected account's ID in order to have Stripe.js create the Token on the connected account.

#

Does that make sense?

fiery frigate
#

Yeah. That makes sense.

#

I didn't use the created connect account Id to initialize the stripe.js

#

But creating external_accounts seems successful.

carmine ridge
#

I don't understand?

#

Can you rephrase?

fiery frigate
#

Now

#

When updating the external_accounts, I got the errors

#

which I showed you.

#

But when creating the external_accounts,

#

I created the token and used it to create the external_accounts

#

without using the stripe connect account Id to initialize stripe.js

#

But seems it is successful.

carmine ridge
#

How could you initialize Stripe.js with an account ID that doesn't exist yet?

#

When you first create the account you can use a Token on your platform because the connected account doesn't exist yet.

#

Am I understanding correctly?

fiery frigate
#

req_4mdUhuwcsNwmHw

carmine ridge
#

Looking, hang on...

#

That request does not involve an external account.

fiery frigate
#

Strange,

#

Seems that request was not logged.

#

Anyway,

#

by the request,

#

the account was attached.

#

req_Lq3b4GX9gYBWkg

#

Sorry.

#

This is the last

#

request.

carmine ridge
#

Ah, okay, I see what you're saying. Hang on...

#

Wait, maybe I don't see. ๐Ÿ˜…

#

What's the request ID of the one that failed?

fiery frigate
#

req_ZdxPMeial4ZgsY

#

This is update request, maybe.

carmine ridge
#

Ah, okay, so that request has the opposite problem; it's a Connect request but it shouldn't be.

#

Meaning in your Node code you should not specify the account ID there.

#

Actually, wait, there are several issues here...

#

Which line of code led to this error?

fiery frigate
#

That method calls this eventually.

carmine ridge
#

Are you trying to update the existing external account or replace it with a new one?

fiery frigate
#

replace it

#

with new one.

carmine ridge
#

Ah, okay, so that's the issue. You're using the update function when you're trying to replace it instead.

#

Whatever code you used for that API call is what you need to do here as well.

fiery frigate
#

This is creating external account request, right?

#

If I call this several times,

#

external accounts

#

is pushed by new one.

#

Even though I use same card number.