#Ihury
1 messages · Page 1 of 1 (latest)
You're referring to the Checkout Session ID yes?
yes
the dispute object does'nt have the session id
and i couldnt find how do i get it
I want to do an action when a dispute is created, but for that I need to get the session referring to it
Ahhh, okay. I think it might be a bit difficult to get the Checkout Session ID from a Dispute, though I'm sure it's possible (looking into that now). What's the action if you don't mind me asking?
I'm using the translator, because my English is not very good, so I apologize if there are any mistakes
No worries!
but i am making a system in a discord bot
when the payment is approved, he edits the message, showing that he was successful
I will show you how it works
when clicking on the button, the user is directed to the site, to pay
after paying, the message edits, informing that the payment was approved
Ah! Okay, so you can do it like this:
(1) Retrieve the Dispute and cache the Payment Intent ID from the Dispute object (see here: https://stripe.com/docs/api/disputes/object#dispute_object-payment_intent)
(2) List all Checkout Sessions and pass in the Payment Intent ID to the call (see here: https://stripe.com/docs/api/checkout/sessions/list#list_checkout_sessions-payment_intent)
(3) The payload will be a Checkout Session object with an ID field