#prasun_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ 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/1324359574056079453
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
This data is being accessed from the event checkout.session.completed but not in invoice.payment_failed while payment is being failed.
that's normal, the metadata is on the Checkout Session object, not the Invoice object.
so you would need to use the Invoice to get back to the Checkout Session object. for example by getting the Subscription ID in the Invoice, and then making an extra API call to retrpieve the corresponding Checkout Session: https://docs.stripe.com/api/checkout/sessions/list
A customer is being created even if payment is failed. I want to reuse that id if I change the checkout session. How?
when you create the new Checkout Session, set thecustomerparameter: https://docs.stripe.com/api/checkout/sessions/createcreate_checkout_session-customer
then it is problematic to combine application's logged in user id and customer id so that the customer id can be used later in the checkout session create api.
I don't really understand. what's your question?
I want to save the customer ID provided by Stripe against the application logged-in user ID passed through metadata so that it can be used later at any time.