Update routes/hello.py
Browse files- routes/hello.py +3 -2
routes/hello.py
CHANGED
@@ -10,6 +10,7 @@ stripe.api_version = "2023-10-16"
|
|
10 |
### **1️⃣ CREATE CONNECTED ACCOUNT** ###
|
11 |
class AccountRequest(BaseModel):
|
12 |
email: str
|
|
|
13 |
|
14 |
@router.post("/create_account")
|
15 |
def create_account(account_data: AccountRequest):
|
@@ -17,11 +18,11 @@ def create_account(account_data: AccountRequest):
|
|
17 |
account = stripe.Account.create(
|
18 |
type="express",
|
19 |
email=account_data.email,
|
20 |
-
country="US", #
|
21 |
business_type="individual",
|
22 |
business_profile={
|
23 |
"mcc": "7298", # MCC for Beauty & Barber Shops (U.S.)
|
24 |
-
"name":
|
25 |
"product_description": "We connect U.S. stylists with clients through subscription services.",
|
26 |
"support_email": "[email protected]"
|
27 |
},
|
|
|
10 |
### **1️⃣ CREATE CONNECTED ACCOUNT** ###
|
11 |
class AccountRequest(BaseModel):
|
12 |
email: str
|
13 |
+
name: str # Now including name in the request body
|
14 |
|
15 |
@router.post("/create_account")
|
16 |
def create_account(account_data: AccountRequest):
|
|
|
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 |
},
|