#raikiri21
1 messages · Page 1 of 1 (latest)
Hello! Can you tell me more about why you're creating an Account Token in this flow? Typically you create the Account via the API, then an Account Link, then send the account holder to that Account Link's URL and there's no Account Token involved.
Oh, is this because it's a French account and you have requirements forcing you to use the Account Token?
Can you give me the request ID showing the error you're seeing? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
this id? req_htdWPiusDnpQtU
Yep, that's it!
Yeah, when using an Account Token like this it's expected that the TOS agreement would already have happened.
Can you restructure the flow so no Account Token is involved?
is there no drawback of not requiring token? my web asp.net is communicating with the website in js , "document.getElementById('startOnboarding').addEventListener('click', async () => {
try {
const accountToken = await stripe.createToken('account', {
business_type: 'individual',
individual: {
first_name: 'Jane',
last_name: 'Doe',
// Include other required information
},
// Add this line to accept the TOS
});
if (accountToken.error) {
console.error(accountToken.error);
return;
}
const userId = firebase.auth().currentUser.uid;
const response = await fetch('/start-onboarding', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
accountToken: accountToken.token.id,
fbId: userId
}),
});
if (!response.ok) {
console.error('Server error:', await response.text());
return;
}
const { url } = await response.json();
window.location.href = url;
} catch (error) {
console.error('An error occurred:', error);
}
});
"
it uses to be for custom account swhere i put tos to true but now i switch to express
Yeah, with Custom and a bespoke onboarding flow you would need the Account Token, but with Express and our hosted onboarding you don't need it.
oh
i'll try to implement without tokens then
also one more question, i'm trying express cause i was planning to switch but also in custom i noticed in the onboarding it doesn't ask for banking info, is it a account type thing, country thing or some settings in my dashboard?
To clarify, you want hosted onboarding to collect bank account info for Custom accounts?
If so, you can enable that here (test mode link): https://dashboard.stripe.com/test/settings/connect/custom
yes, it works thanks so much for answering both my questions
Happy to help!