#befa_api

1 messages ยท Page 1 of 1 (latest)

verbal nightBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1473350599029559299

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

languid storm
#

Let me explain more in details what I am facing. I am building a platform where my customers are creating connected accounts. Some company are under the sole_proprietorship type. As far as I understand the API is automatically creating a Person object where creating this kind od connected account. I now need to add a document (passeport for example) to validate this account but I can't update the person as I am doing it when the user is created after creating a company type

last badge
#

hi there, can you provide more information on where you're seeing the error? what is the exact text of the error message?

languid storm
#

Hello, I'm using the PHP SDK. When I try to add the document I am calling this :

#

$attachedDocument = $this->api->accounts->updatePerson(
$userId,
$kycPersonId,
['verification' => ['document' => ['front' => $documentId]] ]
);

#

where $userId is the stripe accountId and kycPersonId is the personId

#

The error I am receiving is : This person can only be updated with a person token, because it was originally created with a person or account token. (Attempted to update param 'verification' directly.) To set this field create a token with the desired changes. Pass the token with 'person_token' in a request without setting 'verification'. See https://stripe.com/docs/connect/account-tokens#updating for more information

Connect platforms can use Stripe.js, the API, or mobile client libraries to securely collect account details from their users.

#

I tried to generate a personToken by calling this : $token = $stripe->tokens->create([
'account' => [
'business_type' => 'individual',
'individual' => $individualUser,
'tos_shown_and_accepted' => true,
],
]);

#

But the token received (for example ct_1T1qbhQG6G0kBU39mTmamRsg ) is refused by the API also stating that it is not a person token

last badge
#

still looking into this. can you explain more about how you're creating the connected account? are you following a particular guide?

languid storm
#

I am creating the connected account by using $this->api->accounts->update($accountId, $legalUser); where the accountId is the stripe accountId and the $legalUser contains all the informations associated withnthis connected account

last badge
languid storm
#

This is what I already tried. I receive a token (for example last call I received this token : ct_1T1qbhQG6G0kBU39mTmamRsg. But when adding it at the next API call like this : $attachedDocument = $this->api->accounts->updatePerson(
$userId,
$kycPersonId,
[
'person_token' => $stripeToken,
'verification' => ['document' => ['front' => $documentId]]
]
);

#

The error is stating This is not a valid person token: ct_1T1rFLQG6G0kBU393la7BUX7

#

Maybe I should use another parameter to send my createdToken (instead of person_token ) ?

#

Or maybe I can send my documentId when creating the token ?

last badge
#

yes, sending the document when creating the token is what I'm suggesting. the error message you received indicates this may be the resolution (the part about "create a token with the desired changes"), then passing the token in your request without trying to set verification

languid storm
#

OK, but if I don't pass it in the verification part, what field should I use ? a document field ?

last badge
verbal nightBOT
languid storm
#

OK, let me try this quickly

pure cosmos
#

Hi there; I'll be taking over for denton, who needs to step away

languid storm
#

Hello palamedes

#

Just tried what I was asked to do, Here is the requestID : req_ezH3lk0z72C7ZH

#

Are you able to see it or is it better to copy/paste the payload in the chat here?

pure cosmos
#

Just the id is enough

languid storm
#

I am receiving an error indicating that "Received unknown parameter: account[individual][documents]"

#

Or maybe in the individual part I need to add this person field ?

pure cosmos
#

You're passing account as the top level parameter, but denton asked you to try passing person as the top-level parameter in the token; that's the difference between creating an account token and creating a person token

#

so I think what they were suggesting to do was to pass the document when you create the person token in person.documents.company_authorization.files

#

can you give that a try?

languid storm
#

OK, like this ? req_LiFPzoCC1oCGjQ

#

If I indicate person as the top level parameters it seems that all the other parameters are refused ?

pure cosmos
languid storm
#

OK let me have a look

#

Here is the requestID : req_bo8ULwEz77pca7

#

No error received but the document doesn't seem to be accepted either

pure cosmos
languid storm
#

OK, I think it's OK now. Indeed I completely forgot to update my person object after creating the token ๐Ÿ˜…

#

Thank you for your help ๐Ÿ‘

pure cosmos
#

No problem! Glad you got it working