Update routes/hello.py
Browse files- routes/hello.py +14 -5
routes/hello.py
CHANGED
@@ -193,20 +193,29 @@ def create_customer(
|
|
193 |
def create_account(account_data: AccountRequest):
|
194 |
try:
|
195 |
account = stripe.Account.create(
|
196 |
-
type="express",
|
197 |
email=account_data.email,
|
198 |
-
country="BR",
|
199 |
-
business_type="individual",
|
200 |
business_profile={
|
201 |
"mcc": "7298",
|
202 |
-
"name": account_data.name,
|
203 |
"product_description": "We connect stylists with clients through subscription services.",
|
204 |
"support_email": "[email protected]"
|
205 |
},
|
206 |
-
default_currency="brl",
|
207 |
capabilities={
|
208 |
"transfers": {"requested": True},
|
209 |
"card_payments": {"requested": True}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
}
|
211 |
)
|
212 |
return {"account_id": account.id}
|
|
|
193 |
def create_account(account_data: AccountRequest):
|
194 |
try:
|
195 |
account = stripe.Account.create(
|
196 |
+
type="express",
|
197 |
email=account_data.email,
|
198 |
+
country="BR",
|
199 |
+
business_type="individual",
|
200 |
business_profile={
|
201 |
"mcc": "7298",
|
202 |
+
"name": account_data.name,
|
203 |
"product_description": "We connect stylists with clients through subscription services.",
|
204 |
"support_email": "[email protected]"
|
205 |
},
|
206 |
+
default_currency="brl",
|
207 |
capabilities={
|
208 |
"transfers": {"requested": True},
|
209 |
"card_payments": {"requested": True}
|
210 |
+
},
|
211 |
+
settings={
|
212 |
+
"payouts": {
|
213 |
+
"schedule": {
|
214 |
+
"interval": "monthly",
|
215 |
+
"monthly_anchor": 15, # 🔹 Define o pagamento para o dia 15 de cada mês
|
216 |
+
"delay_days": 30 # 🔹 Atraso opcional (pode ser ajustado)
|
217 |
+
}
|
218 |
+
}
|
219 |
}
|
220 |
)
|
221 |
return {"account_id": account.id}
|