#hasnatt_payout-requirement

1 messages ¡ Page 1 of 1 (latest)

vernal vigilBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1248743778970505317

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

fading coral
#

@opal escarp the error is telling you about the missing requirements. So that's the next step: providing the required information for it to work

#

hasnatt_payout-requirement

opal escarp
#

def create_stripe_connected_account(driver):
try:
account = stripe.Account.create(
type='express',
country='US',
email=driver.email,
business_type='individual',
individual={
'first_name': driver.first_name,
'last_name': driver.last_name,
'email': driver.email,
'dob': {
'day': 1,
'month': 1,
'year': 1990,
},
'address': {
'line1': '1234 Main Street',
'city': 'San Francisco',
'state': 'CA',
'postal_code': '94111',
'country': 'US'
},
'ssn_last_4': '1234',
},
)
driver.stripe_account_id = account.id
driver.save()
return account
except stripe.error.StripeError as e:
print(f"Error creating Stripe account: {e}")
return None

def attach_bank_account_to_stripe(driver, bank_account):
try:
account = stripe.Account.retrieve(driver.stripe_account_id)
bank_account_token = stripe.Token.create(
bank_account={
"country": "US",
"currency": "usd",
"account_holder_name": bank_account.bank_account_title,
"account_holder_type": "individual",
"routing_number": "110000000", # Example routing number, use actual value
"account_number": bank_account.account_number,
},
)
account.external_accounts.create(external_account=bank_account_token.id)
except stripe.error.StripeError as e:
print(f"Error attaching bank account: {e}")

#

can you please see this and tell me more about which requirement is pending?

fading coral
#

Sorry you dumped dozens of lines of code here.

opal escarp
#

Error creating Stripe account: Request req_hscDJzvkrIewR9: You cannot accept the Terms of Service on behalf of accounts where controller[requirement_collection]=stripe, which includes Standard and Express accounts.