#_sidharth
1 messages · Page 1 of 1 (latest)
Hello Orakaro!
try:
session = stripe.checkout.Session.create(
success_url="", # need to add
cancel_url="", # need to add
mode="payment",
line_items=[{
"price": PlanUtils.plan_price_mapping()[PlanRepository.get_plan_by_id(request.plan_id).name],
"quantity": 1,
}],
metadata={
"planId": request.plan_id,
"userId": "coming shortly"
}
)
return {"sessionId": session["id"]}
this is the session creation
The metadata is available in the Checkout Session object level. Which mean you want to call Retrieve Checkout Session API to retrieve it
oh aight let me check