#_sidharth

1 messages · Page 1 of 1 (latest)

chrome groveBOT
hybrid kite
#

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

cursive stone
#

The metadata is available in the Checkout Session object level. Which mean you want to call Retrieve Checkout Session API to retrieve it

hybrid kite
#

oh aight let me check