#emng_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/1398192955977633924
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! can you share an example Checkout Session id for me to take a look?
cs_test_a1LPTylAtwFzRcJSr5qztwzLxeZMvzGgHCO7XoKHjegeKaBOQkcgPJbc8N, this is in the sandboxed envrionment
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
for context, this is because starting from API version 2025-03-31.basil, we added support for multiple payments on invoices : https://docs.stripe.com/changelog/basil/2025-03-31/add-support-for-multiple-partial-payments-on-invoices. You're currently using API version 2025-04-30.basil for your requests
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?
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?
you would need the PaymentIntent or Charge id, not the PaymentMethod id : https://docs.stripe.com/api/refunds/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
sorry, it's late, I mean the payment intent
I've been trying to get the payment intent id
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
in case you haven't seen this yet, you can use test clocks to mimic the passing of time : https://stripe.com/docs/billing/testing/test-clocks
Yeah, I've worked with those before.