#ahmed-bahgat_unexpected
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/1384172794161528855
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, what error are you specifically seeing? Can you share way more details here please?
When not in test mode, account tokens may only be created using your application's publishable key. You should only create account tokens in your client application (e.g., using Stripe.js or the Android or iOS SDKs) and never from your application server. Creating account tokens from your application server may cause you to fall out of compliance with certain regulations
This is the error I get from the Firebase cloud function I use for creating a Stripe connected account
when I tried to create the account token from the client side (which is my Flutter app)
The Flutter SDK doesn't provide a way to create a token except for bankAccount,card or PII token, is it a must to use iOS SDK, Android SDK or Stripe.js to be able to create that token?
const token = await stripe.tokens.create({
account: {
business_type: 'individual',
individual: {
email: accountData.individual.email,
first_name: accountData.individual.first_name,
last_name: accountData.individual.last_name,
phone: accountData.individual.phone,
dob: accountData.individual.dob,
address: accountData.individual.address,
},
tos_shown_and_accepted: accountData.tos_shown_and_accepted,
},
});
I used to use the previous code to generate a token with that provided data,
there is no way to do the same on Flutter SDK, so how can I create a token from the client side if there is no way to do that from Flutter?
I see, let me grab a teammate who has more expertise with Mobile. Thank you for your patience.
Sorry, I'm still getting help here
Alright
Hello
We don't own Flutter Stripe SDK so we can't help with it's support of certain features.
As per - https://docs.stripe.com/connect/account-tokens#mobile-tokens This is only supported via iOS/Android SDK and if I recall correctly flutter_stripe wraps around React Native SDK?
So your only option seems to be to use a WebView and redirect your customers to a webpage where you can use Stripe.js to create Account Tokens
Got it
Thanks for help ๐