#mechanic_code

1 messages ยท Page 1 of 1 (latest)

lucid crowBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1230754917975593002

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

tiny fulcrum
#

hello! what webhook event are you listening for? Can you share an example Checkout Session id for which payment is completed?

#

it'll have the prefix cs_test

long pagoda
#

Create a new Stripe Checkout Session

        checkout_session = stripe.checkout.Session.create(
            payment_method_types=['card'],
            line_items=[{
                'price': data['price_id'],  # Expect 'price_id' to be passed in request
                'quantity': 1,
            }],
            mode='subscription',
            success_url='http://localhost:3000/payment/success?session_id={CHECKOUT_SESSION_ID}',
            cancel_url='http://localhost:3000/payment/cancel',
        )
#

this is my response. it has the cs_test

#

event = stripe.Webhook.construct_event(
payload, sig_header, endpoint_secret
)

this is my webhook, i just wanted to know when the payment is completed, |
so payment_intent.successful is what i am listening to.
but it does not have the session id in it

tiny fulcrum