habulaj commited on
Commit
dfbce24
·
verified ·
1 Parent(s): f6bb55d

Update routes/hello.py

Browse files
Files changed (1) hide show
  1. routes/hello.py +5 -7
routes/hello.py CHANGED
@@ -16,15 +16,13 @@ class AccountRequest(BaseModel):
16
  def create_account(account_data: AccountRequest):
17
  try:
18
  account = stripe.Account.create(
19
- type="express",
20
  email=account_data.email,
21
  country="US", # United States
22
- business_type="individual",
23
- business_profile={
24
- "mcc": "7298", # MCC for Beauty & Barber Shops (U.S.)
25
- "name": account_data.name, # Using the name from the request body
26
- "product_description": "We connect U.S. stylists with clients through subscription services.",
27
- "support_email": "[email protected]"
28
  },
29
  capabilities={
30
  "transfers": {"requested": True},
 
16
  def create_account(account_data: AccountRequest):
17
  try:
18
  account = stripe.Account.create(
19
+ type="express", # Express account type for individual accounts
20
  email=account_data.email,
21
  country="US", # United States
22
+ business_type="individual", # Ensuring the account is individual, not business
23
+ individual={
24
+ "first_name": account_data.name, # Individual's first name
25
+ "last_name": "", # Optional, leave empty for individual accounts
 
 
26
  },
27
  capabilities={
28
  "transfers": {"requested": True},