Update routes/subscription.py
Browse files- routes/subscription.py +9 -1
routes/subscription.py
CHANGED
@@ -532,13 +532,21 @@ def emergency_checkout_session(
|
|
532 |
transfer_data={
|
533 |
"destination": stylist_stripe_id, # 80% para o estilista
|
534 |
},
|
|
|
|
|
|
|
|
|
|
|
535 |
)
|
536 |
|
537 |
return {
|
538 |
"message": "Emergency checkout session created successfully!",
|
539 |
"clientSecret": payment_intent.client_secret,
|
540 |
"paymentIntentId": payment_intent.id,
|
541 |
-
"price": f"{emergency_price / 100:.2f} USD"
|
|
|
|
|
|
|
542 |
}
|
543 |
|
544 |
except Exception as e:
|
|
|
532 |
transfer_data={
|
533 |
"destination": stylist_stripe_id, # 80% para o estilista
|
534 |
},
|
535 |
+
metadata={
|
536 |
+
"stylist_id": stylist_id, # Id do estilista
|
537 |
+
"client_id": user_id, # Id do cliente
|
538 |
+
"subscription_id": subscription_data[0]["id"] # Id da assinatura do cliente
|
539 |
+
}
|
540 |
)
|
541 |
|
542 |
return {
|
543 |
"message": "Emergency checkout session created successfully!",
|
544 |
"clientSecret": payment_intent.client_secret,
|
545 |
"paymentIntentId": payment_intent.id,
|
546 |
+
"price": f"{emergency_price / 100:.2f} USD",
|
547 |
+
"stylist_id": stylist_id,
|
548 |
+
"client_id": user_id,
|
549 |
+
"subscription_id": subscription_data[0]["id"]
|
550 |
}
|
551 |
|
552 |
except Exception as e:
|