#befa_api
1 messages ยท Page 1 of 1 (latest)
๐ 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.
- befa_best-practices, 4 days ago, 7 messages
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
hi there, can you provide more information on where you're seeing the error? what is the exact text of the error message?
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
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
still looking into this. can you explain more about how you're creating the connected account? are you following a particular guide?
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
ok, can you try using the following API method to create a Person token: https://docs.stripe.com/api/tokens/create_person
passing the documents in the person.documents field
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 ?
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
OK, but if I don't pass it in the verification part, what field should I use ? a document field ?
the documents field in the Person Token creation request, for example https://docs.stripe.com/api/tokens/create_person#create_person_token-person-documents-company_authorization-files
OK, let me try this quickly
Hi there; I'll be taking over for denton, who needs to step away
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?
Just the id is enough
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 ?
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?
OK, like this ? req_LiFPzoCC1oCGjQ
If I indicate person as the top level parameters it seems that all the other parameters are refused ?
Well you have to use the parameters available on that endpoint. For example if you're passing TOS information that is located here for creating a Person token: https://docs.stripe.com/api/tokens/create_person#create_person_token-person-additional_tos_acceptances-account
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
Well I think you need to update the person with the token, right?
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 ๐
No problem! Glad you got it working