Update routes/hello.py
Browse files- routes/hello.py +4 -3
routes/hello.py
CHANGED
@@ -10,7 +10,7 @@ stripe.api_version = "2023-10-16"
|
|
10 |
### **1️⃣ CREATE CONNECTED ACCOUNT** ###
|
11 |
class AccountRequest(BaseModel):
|
12 |
email: str
|
13 |
-
name: str #
|
14 |
|
15 |
@router.post("/create_account")
|
16 |
def create_account(account_data: AccountRequest):
|
@@ -18,14 +18,15 @@ def create_account(account_data: AccountRequest):
|
|
18 |
account = stripe.Account.create(
|
19 |
type="express", # Express account type for individual accounts
|
20 |
email=account_data.email,
|
21 |
-
country="
|
22 |
business_type="individual", # Ensuring the account is individual, not business
|
23 |
business_profile={
|
24 |
"mcc": "7298",
|
25 |
"name": account_data.name, # Using the name from the request body
|
26 |
-
"product_description": "We connect
|
27 |
"support_email": "[email protected]"
|
28 |
},
|
|
|
29 |
capabilities={
|
30 |
"transfers": {"requested": True},
|
31 |
"card_payments": {"requested": True}
|
|
|
10 |
### **1️⃣ CREATE CONNECTED ACCOUNT** ###
|
11 |
class AccountRequest(BaseModel):
|
12 |
email: str
|
13 |
+
name: str # Name of the individual account owner
|
14 |
|
15 |
@router.post("/create_account")
|
16 |
def create_account(account_data: AccountRequest):
|
|
|
18 |
account = stripe.Account.create(
|
19 |
type="express", # Express account type for individual accounts
|
20 |
email=account_data.email,
|
21 |
+
country="BR", # Brazil
|
22 |
business_type="individual", # Ensuring the account is individual, not business
|
23 |
business_profile={
|
24 |
"mcc": "7298",
|
25 |
"name": account_data.name, # Using the name from the request body
|
26 |
+
"product_description": "We connect Brazilian stylists with clients through subscription services.",
|
27 |
"support_email": "[email protected]"
|
28 |
},
|
29 |
+
default_currency="brl", # Set currency to BRL (Brazilian Real)
|
30 |
capabilities={
|
31 |
"transfers": {"requested": True},
|
32 |
"card_payments": {"requested": True}
|