#abinashvision135
1 messages · Page 1 of 1 (latest)
I don't understand the question. What API calls are you making?
i used this <script type="text/javascript" src="https://js.stripe.com/v2/"></script>
<script src="https://js.stripe.com/v3/"></script>
i want to use stripe connect.
i try with this code
i take a form which is given field accoding body, like that account no. holder name, email, name, and pin code
*routing no.
Can you paste the code here?
ok
Also please use codeblocks next time or gist.github.com.
const handleBankDetails = async (e, bankDetails) => {
e.preventDefault();
try {
const stripe = await stripePromise;
const account = await stripePromise?.accounts?.create({
type: 'custom',
country: 'US',
email: bankDetails.account_holder_email,
requested_capabilities: ['transfers'],
business_type: 'individual',
individual: {
email: bankDetails.account_holder_email,
first_name: bankDetails.account_holder_name,
last_name: '',
address: {
line1: '123 Main Street',
city: 'Anytown',
state: 'CA',
postal_code: bankDetails.account_holder_pin,
},
dob: {
day: '01',
month: '01',
year: '1970',
},
verification: {
document: {
front: 'file_123',
},
},
},
business_profile: {
url: 'https://example.com',
},
tos_acceptance: {
date: Math.floor(Date.now() / 1000),
ip: '127.0.0.1',
},
});
await stripe?.accounts?.createExternalAccount(account.id, {
external_account: {
object: 'custome',
country: 'Belgium',
currency: 'AUD',
account_holder_name: bankform.holderName,
account_holder_type: 'custome',
routing_number: bankform.routing,
account_number: bankform.account_no,
},
});
await stripe?.accounts?.update(account.id, {
external_account: {
default_for_currency: true,
},
});
const bankAccount = {
country: 'US',
currency: 'USD',
account_holder_name: bankform.fname,
account_holder_type: 'individual',
account_number: bankform.account_no,
account_holder_email: bankform.email,
routing_number: bankform.routing,
account_holder_pin: bankform.pincode,
};
const result = await stripe?.createToken('bank_account', bankAccount);
if (result.error) {
console.log(result.error.message);
} else {
token: result?.token?.id
console.log(result.token.id);
updateBankDetails(user?.uid, { ...bankAccount, token: result.token?.id });
console.log(`Bank details for user ${user?.uid} added successfully.`);
}
} catch (error) {
console.error(`Error adding bank details for user : ${error.message}`);
}
}
i sent code in two parts but both parts in one function
or you could have sent one message with a https://gist.github.com/ link.
ok
What is the actual issue you're having here? So far you've sent me a wall of code without describing the problem you have
i sent please check
i want to use stripe connect
i want to implement Stripe Connect, will
involve integration as well as adding an option in reviewer profile to
subscribe/connect/manage Stripe Connect Account with this code
Ok, you told me what you want to do. But what issues are you having with the code you've shared? Is there a specific error?
i implement this code, i got token and user id with bank details, i see user added but i didn't see any account create on stripe connect
Are you an Indian merchant/account?
yes
You can't use custom Connect in India: https://support.stripe.com/questions/stripe-india-support-for-marketplaces
Find help and support for Stripe. Our support center 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.
You're trying to create Accounts with type: 'custom', so the API request is likely failing
sorry, i used custome account for belgium
No, your code here:
const account = await stripePromise?.accounts?.create({
type: 'custom',
country: 'US',
...
})
You're trying to create a US based custom account. If you're an Indian platform, it won't work
Hi! I'm taking over this thread.
Can you share your account ID (acct_xxx)? It's at the top of this page: https://dashboard.stripe.com/settings/account
is this safe to share account id, because this is not my project, this is client project
and client account
can you provide me code of stripe connect account, customer, transfer payment . if you have
is this safe to share account id, because this is not my project, this is client project
If you are not comfortable with sharing the account ID publicly, then you should contact Stripe support to have a private conversation: https://support.stripe.com/contact
can you provide me code of stripe connect account, customer, transfer payment . if you have
Depends exactly what you want to do. But for Express with Destination Charge, we have this great guide: https://stripe.com/docs/connect/collect-then-transfer-guide
i want to implement Stripe Connect, will
involve integration as well as adding an option in reviewer profile to
subscribe/connect/manage Stripe Connect Account
i want do this
Which types of connected account you want to create (https://stripe.com/docs/connect/accounts)? Which type of charge you want to create (https://stripe.com/docs/connect/charges )?
i want to create custome account
Note that we don't recommend using custom since it's the most difficult integration to build. We usually recommend Express or Standard instead. Also note that for India accounts there are some limitation for custom accounts as mentioned here: https://support.stripe.com/questions/onboarding-requirements-for-stripe-connect-in-india
yes i know some limitation custome accounts for some coutries, but belgium can use custome accounts
am i right
Got it. Then this is our documentation on custom accounts: https://stripe.com/docs/connect/custom-accounts
Let me know if you have specific questions I can help with.
i also used belgium stripe secret key and publish key
can i create customer and stripe connect account, on stripe by code use next.js with firebase
like that this is created by code, same as well as i want to connect stripe connect by code
We have a firebase extension here: https://extensions.dev/extensions/stripe/firestore-stripe-payments but I don't know if it works for connect
like that this is created by code, same as well as i want to connect stripe connect by code
Have you read the documentation I shared? It covers how to create custom accounts with code https://stripe.com/docs/connect/custom-accounts