#aloksharma0135
1 messages · Page 1 of 1 (latest)
Hello what is the error that you are seeing?
i am facing the error Request req_P0NzjJtw6J0PDY: The bank account ba_1O2A6MJXrICFjT79JwHZ8O2L is
not attached to this Stripe account. External accounts can only be attached to Standard accounts via the
dashboard.
try:
customer = stripe.Customer.create(
email="alok.sharma@abcTest.com",
description="Alok Sharma Description",
name="Alok Sharma"
)
print(f"Customer ID: {customer.id}")
token = stripe.Token.create(
# bank_account={
# "country": "US",
# "currency": "usd",
# "account_holder_name": "Your Name",
# "account_holder_type": "individual",
# "account_number": "000123456789", # Use the test bank account number
# "routing_number": "110000000", # Use a test routing number
# }
bank_account={
"country": "au",
"currency": "aud",
"account_holder_name": "Alok Sharma",
"account_holder_type": "individual",
"routing_number": "110000",
"account_number": "000123456"
# "account_number": "000123456"
},
)
# print("ckjdbwcjhgejbcerv=",token)
external_account = stripe.Customer.create_source(
customer.id,
source=token.id
)
print("External Account ID:", external_account.id) # Check if the external account ID is printed
transfer = stripe.Transfer.create(
amount=100, # Adjust the amount as needed
currency="usd",
destination=external_account.id
)
print("Transfer ID:", transfer.id)
except stripe.error.StripeError as e:
print(f"Stripe Error: {e}")
the problem is i want to payput my customer from my stripe account to their bank account using python Please help
It looks like ba_1O2A6MJXrICFjT79JwHZ8O2L is a PaymentMethod that is attached to a customer
You cannot pay out to customers unfortunately
You will need to use Stripe Connect and create Accounts for each user that you want to pay out to https://stripe.com/docs/connect
You can create them via the API but for most account types the account holder needs to fill out onboarding info themselves
for example ?
To join the video meeting, click this link: https://meet.google.com/xmh-xexq-gvg
Otherwise, to join by phone, dial +1 929-266-1114 and enter this PIN: 143 759 479#
To view more phone numbers, click this link: https://tel.meet/xmh-xexq-gvg?hs=5
may you please connect on meet
it might life saver for me
We don't offer video calls on this server unfortunately
Stripe Connect is very complex, I reccommend reading our docs on it to understand what you have to do here
I am happy to help with questions that you run in to but unfortunately I cannot walk you through all of it and all of the decisions that you need to make
ok
just may you please brief about what is the flow when i want to payout my 1000 of customer from my account to their own account and it should automate and we have to done it using python is it possible to achieve this task ? Please Help ..... beacuse i am stuck here for a week
At a basic level you will need to:
- Create a connected account for this user
- Collect the necessary onboarding info to enable them for transfers and payouts
- Transfer 1000 to that Account
- Initiate a manual payout for the account or wait for the automatic payout to be initiated
But each of those steps has a lot of complexity that you will need to read the docs to find the steps for