#erwanndiagram_code
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/1270289982434578555
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Une erreur s'est produite : Parameter 'company' cannot be used in conjunction with an account token. To set this field create a token with the desired changes. Pass the token with 'account_token' in a request without setting 'company'. See https://stripe.com/docs/connect/account-tokens#updating for more information.
Hello
if i can t inform verifiaction document on the token when i do this on client size and i can t inform document on the server size because of i created token on the client size that was needed due to security how can I manage this ?
okay no problem
I'm terribly sorry, I totally missed getting back to your question
it s okay you have an idea to what can i do ?
have you had a chance to look at https://docs.stripe.com/connect/custom/onboarding#api-based-onboarding
this is the new custom account onboarding recommendation
you can also use our embedded onboarding components to reduce the amount of programming that you have to do, especially if you don't want to use our hosted onboarding
okay i will check it
I read it, I already code it, all works except for company.verification.document , I retrieve the files sent by user and create Stripe instance Files, after I create token on stripe.js for account where I can't inform the files, and I don't where inform them
On js after retrieve form sent by user :
async function createTokenAccountStripe(data) {
const token = await stripe.createToken("account", {
business_type: "company",
company: {
name: data["businessName"],
address: {
line1: data["businessAddress"],
city: data["businessCity"],
state: data["businessState"],
postal_code: data["businessPostalCode"],
country: data["businessCountry"]
},
vat_id: data["companyVatId"] || undefined,
tax_id: data["companyRegistrationNumber"],
phone: data["businessPhone"],
},
tos_shown_and_accepted: true
});
if (token.error) {
throw new Error(token.error.message);
}
return token["token"]["id"];
}
on php with the data i get from js
$stripeAccount = Account::create(
[
'type' => 'custom',
"country" => $data['businessCountry'],
'capabilities' => [
'card_payments' => ['requested' => true],
'transfers' => ['requested' => true],
],
// don t work
// 'company' => [
// 'verification' => [
// 'document' => [
// 'front' => $arrayTokenFiles["tokenAdditionalFileFront"],
// 'back' => $arrayTokenFiles["tokenAdditionalFileBack"],
// ],
// ],
// ],
'business_profile' => [
'mcc' => 7230,
'url' => 'cowobo.com',
"support_email" => $data["representativeEmail"],
"support_phone" => $data["representativePhone"],
"support_address" => [
"line1" => $data['representativeAddress'],
"city" => $data['representativeCity'],
"state" => $data['representativeState'],
"postal_code" => $data['representativePostalCode'],
"country" => $data['businessCountry'],
],
],
'email' => $email,
'account_token' => $tokenAccount,
"settings" => [
"payouts" => [
"schedule" => [
"interval" => "manual",
],
],
],
]
);
you're not passing the business_type to the Account creation request https://docs.stripe.com/api/accounts/create#create_account-business_type
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
first line of token creation :
async function createTokenAccountStripe(data) {
const token = await stripe.createToken("account", {
business_type: "company",
do you prefer screen shots because ther is no color :/
would you mind sharing the request IDs? (the one for the token and the one for the account creation). https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
I'm not sure whether the accountToken, since it's holding a company hash, is overriding what you're passing in the account creation company hash
I need to verify that
yes i can but i dont know how can this be useful if you want i can send you the logs
oh okay
can you try something for me please
can you create the account, and then update it with the documents?
this way we can be sure
yes i can try
5minutes i will send you screenshots and change my env for prod
i send without document verification (named premier document additionnel)
token of account : ct_1PkjNCP08JNx8Ptc9n4y7utr
my files token and account token
okay so in production my code works but
but why do we have do send the additional files after
why don't you try to add the files to the account token creation https://docs.stripe.com/api/tokens/create_account#create_account_token-account-company-verification
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
that s what i did but for the first time when we create and don't update account it doesn't work
no you passed it in the account creation request in the backend
not in the account token creation in the frontend
i can t do it because i inform the company information in the token and if i do this i get this error :
Une erreur s'est produite : Parameter 'company' cannot be used in conjunction with an account token. To set this field create a token with the desired changes. Pass the token with 'account_token' in a request without setting 'company'. See https://stripe.com/docs/connect/account-tokens#updating for more information.
that's not what I meant
I meant in the first code
const token = await stripe.createToken("account", {
business_type: "company",
company: {
name: data["businessName"],
address: {
line1: data["businessAddress"],
city: data["businessCity"],
state: data["businessState"],
postal_code: data["businessPostalCode"],
country: data["businessCountry"]
},
vat_id: data["companyVatId"] || undefined,
tax_id: data["companyRegistrationNumber"],
phone: data["businessPhone"],
},
tos_shown_and_accepted: true
});
if (token.error) {
throw new Error(token.error.message);
}
return token["token"]["id"];
}
in this you can add the verification documents here
oh ok that s what i do for but idk why it won t add the files for a creation (that s the results I get yesterday) and only in production environment so i try again
i think i changed one thing between yesterday and today my files have the purpose account_requirement and before they have additional_verification
did it work now?
Sorry but i have to wait for some reason i tell you when i do it
sure let me know if you need any more help