#emng_webhooks

1 messages ¡ Page 1 of 1 (latest)

delicate notchBOT
#

👋 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/1398192955977633924

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

cobalt flower
#

hello! can you share an example Checkout Session id for me to take a look?

tropic canyon
#

cs_test_a1LPTylAtwFzRcJSr5qztwzLxeZMvzGgHCO7XoKHjegeKaBOQkcgPJbc8N, this is in the sandboxed envrionment

cobalt flower
#

You won't be able to access the PaymentIntent from either of those objects or webhook events. You'll need to make a request to list all payments for an invoice : https://docs.stripe.com/api/invoice-payment/list#list_invoice_payments-payment-type and expand https://docs.stripe.com/api/invoice-payment/object#invoice_payment_object-payment-payment_intent

tropic canyon
#

I see. thank you! just to make sure I have a good understanding of things. The reason I want to get the payment method id is so I can process refunds, is it correct that I need this for that? And for a subscriptions each time it gets rebilled, a new invoice will be created is that correct? Then I can use the invoice.payment_succeeded webhook to fetch the list as you suggested above to associate the payment method id with the invoice on my system?

cobalt flower
#

from what I recall, you shouldn't need the PaymentMethod id to process refunds, can you share why or where did you see that you need the PaymentMethod id?

tropic canyon
#

sorry, it's late, I mean the payment intent

#

I've been trying to get the payment intent id

cobalt flower
#

Yes, each time a subscription is renewed, assuming there is a non-zero payment to be made, a new invoice would be created. And yes, you can listen for the invoice.payment_succeeded webhook to fetch the list, which would contain the PaymentIntent

tropic canyon
#

Yeah, I've worked with those before.