#ibrahim-account-companydocuments

1 messages ยท Page 1 of 1 (latest)

lunar fableBOT
marsh grove
#

Verification status of which item exactly?

#

Generally you just inspect the requriements hash to see if there's any outstanding requirements

#

It'll show pending verification items as well

#

But also you can check charges_enabled and payouts_enabled to see if your account is active

#

You kind of have to check multiple things

#

Which was the old field you were examining exactly?

molten scroll
#

We were examining :

legal_entity->verification->status to check if it verified or unnverified

#

this basically confirms if user has uploaded ID document and its verified or not.

I tried charges_enabled and its 1 when document is not uploaded too.

marsh grove
#

Ah I see

#

hm that seems wrong though

#

looking

molten scroll
#

yes there is company.verification field but its still null after I have uploaded the document and its showing Document Provided in Stripe Dashboard:

{"document":{"back":null,"details":null,"details_code":null,"front":null}

marsh grove
#

Weird hm let me ask a colleague

molten scroll
#

Sure. TIA

mental monolith
#

๐Ÿ‘‹ Hello! Can you please share detailed information with exact Account id acct_123, File id file_123 and exact request id req_123 so that I can make sure we look at the same thing?

molten scroll
#

yes in a moment

mental monolith
#

I just tried quickly in Test mode and that part works fine for me at least

#

I did $account = $stripe->accounts->create([ 'type' => 'custom', 'country' => 'us', ... 'company' => [ 'verification' => [ 'document' => [ 'front' => 'file_identity_document_success', 'back' => 'file_identity_document_success', ], ], ], ]); and in the response I see "company": { ... "verification": { "document": { "back": "file_123", "details": null, "details_code": null, "front": "file_abc" } } },

#

ibrahim-account-companydocuments

molten scroll
#

Let me check:

We are doing this after create:

\Stripe\Account::updatePerson()

mental monolith
#

that updates a Person though

#

Sorry I thought you were explicitly asking about the company part? Is that not the case?

molten scroll
#

We basically create an Account as company and then update if with

['verification' => ['document' => ['front' => $result->id]]]

#

after that we were checking
egal_entity->verification->status

mental monolith
#

\Stripe\Account::updatePerson() updates a Person which is a separate API object that describes a human associated with that company

#

I'm sorry I'm struggling to understand the overall issue as you seem to mix up new code (company, Person API) and really old legacy code (legal_entity)

molten scroll
#

yes I was just telling that we update person with verification document after creating.

#

not using legal entity now, was referring to what we were using before

#

This:

Previously when we fetch Account using:
\Stripe\Account::retrieve

and the account was created as company, we got object of "legal_entity" in which we get information if user is verified in verification object and status attribute as well. But using New API we are not getting any object in response to check if document was uploaded/verified or unverified when Account in created as Company (business_type = company). But we are getting it if Account is individual.

mental monolith
#

Sorry I'm still really confused. Are you updating a human (Person) id document? Or are you uploading a company's document?

#

they are completely different things and you did neither of those on the account id you shared earlier

#

So let's ignore the "retrieve" part for a sec. Can you share exact code of your update and what the response is with the exact object ids? I want to make sure we talk about the same thing

molten scroll
#

just a minutes

mental monolith
#

sure!

molten scroll
#

So I have created an Account as company

acct_1OLBolPqGtfd9yIM

Not Uploaded a verificaton document. Doing it next

mental monolith
#

would be a lot easier for you to do all of this in one call

#

you are just debugging, and that means only looking at one call and one response. Can you do that?

molten scroll
#

hmm Actually I am using the flow our system is built. I can try your suggestion as well. Need to write seprate request for that.

File ID:

file_1OLBuEPqGtfd9yIMSwfaxE9i

#

Respose after:

$response = \Stripe\Account::updatePerson(
$spc_publishable_key_check->service_provider_stripe_user_id,
$person->data[0]->id,
['verification' => ['document' => ['front' => $result->id]]]
);

#

{
"id": "person_1OLBopPqGtfd9yIMeQ772Lzn",
"object": "person",
"account": "acct_1OLBolPqGtfd9yIM",
"additional_tos_acceptances": {
"account": {
"date": null,
"ip": null,
"user_agent": null
}
},
"address": {
"city": null,
"country": "US",
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"created": 1702071767,
"dob": {
"day": 1,
"month": 2,
"year": 1984
},
"email": "m.ibrahim.15976@khi.iba.edu.pk",
"first_name": "muhammad",
"future_requirements": {
"alternatives": [],
"currently_due": [],
"errors": [],
"eventually_due": [],
"past_due": [],
"pending_verification": []
},
"id_number_provided": true,
"last_name": "ibrahim",
"metadata": [],
"phone": "+12015550120",
"relationship": {
"director": false,
"executive": false,
"legal_guardian": false,
"owner": false,
"percent_ownership": null,
"representative": false,
"title": null
},
"requirements": {
"alternatives": [],
"currently_due": [],
"errors": [],
"eventually_due": [],
"past_due": [],
"pending_verification": []
},
"ssn_last_4_provided": true,
"verification": {
"additional_document": {
"back": null,
"details": null,
"details_code": null,
"front": null
},
"details": "This person does not need to be verified to enable account capabilities",
"details_code": null,
"document": {
"back": null,
"details": null,
"details_code": null,
"front": "file_1OLBuEPqGtfd9yIMSwfaxE9i"
},
"status": "unverified"
}
}

mental monolith
#

so it worked?

#

it's right there in our output

molten scroll
#

I am getting correct verification object here but when I am doing:

                                              $response = \Stripe\Account::retrieve($stripeAccount->service_provider_stripe_user_id);

I am not getting status then

mental monolith
#

that's entirely expected!

#

An Account can have many Person attached to it, we don't list them all on Account. You have to explicitly go and retrieve or list them separately

molten scroll
#

I see. but only for company case?

#

I am getting status when its individual in individual object

#

what you are saying is making sense to me

mental monolith
#

correct when an Account is an individual there's only one Person associated with it so we return it by default in individual. But for companies there can be more, sometimes there can be 5 or 10 in some countries with lots of owners and such

molten scroll
#

I see... let me call Person API and verify please give me a minute. Thank you in advance BOSS

mental monolith
molten scroll
#

I got that

#

in Person

#

Thank you so much

mental monolith
#

sure thing!

molten scroll
#

I need to maintain company and individual separately now right

mental monolith
#

I bet it's confusing if you migrated from the old API shape where everything was in legal_entity

molten scroll
#

Yesss

#

I didn't know that actuallly

#

But Hats of to you for understading my case.

#

I am so much thankful Sir

mental monolith
#

happy to help ๐Ÿ™‚

molten scroll
#

See you then