habulaj commited on
Commit
868ad24
·
verified ·
1 Parent(s): b6aedf5

Update routes/hello.py

Browse files
Files changed (1) hide show
  1. 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", # Express account type for individual accounts
197
  email=account_data.email,
198
- country="BR", # Brazil
199
- business_type="individual", # Ensuring the account is individual, not business
200
  business_profile={
201
  "mcc": "7298",
202
- "name": account_data.name, # Using the name from the request body
203
  "product_description": "We connect stylists with clients through subscription services.",
204
  "support_email": "[email protected]"
205
  },
206
- default_currency="brl", # Set currency to BRL (Brazilian Real)
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}