#renlaer057
1 messages · Page 1 of 1 (latest)
hello! yes, you will receive a webhook event as well
But I don't find the refund reason in the webhook event, where is it? Or does it say he won't give me the reason
can you share the event id?
"id": "evt_3NmcBvILBklWVE7i0ymVXHYk",
I wrote Refund Reason: Duplicate, but I can't seem to find a field about duplicates in the webhook event
the charge.refunded event doesn't contain the refund object unfortunately. Try retrieving the corresponding refund(s) using https://stripe.com/docs/api/refunds/list#list_refunds-charge - the Refund object should contain the reason
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Well, do you need me to take the initiative to inquire?
i'm sorry, i'm not sure i understand your question?
We need to use the query refund list interface to know the reason for the refund, right?
yes, you need to retrieve the Refund object
OK,thanks
By the way, how do I repeatedly send refund webhook callbacks to our API in the stripe dashboard?
what do you mean by repeatedly send refund webhook callbacks? Do you mean you want to repeatedly resend the events? Can you describe in more detail what you're trying to do?
When an order is refunded, you will take the initiative to send a wehook to notify us of the refund event. What should I do when I want you to send me a refund event for this order again.
why do you need Stripe to send the refund event again? what's the use case here? Is it that the event failed to be successfully delivered?
yes
if the event failed to be delivered, and it's still within 30 days [0] , the Dashboard should have a button to resend the failed event.
[0] https://support.stripe.com/questions/stripe-event-retention-period
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
thanks
cs_live_a12PhL0ESKaJDQiby8WMBGqnbZ2oR8Agc4dBuQIsUAfsguj006UEoMzKl7
When we expired this checkout session, an error message appeared:
payment_intent_unexpected_state - payment_method
This PaymentIntent's payment_method could not be updated because it has a status of canceled. You may only update the payment_method of a PaymentIntent with one of the following statuses: requires_payment_method, requires_confirmation, requires_action.
We have not received any cancellation notification for this order and we don’t know why it was automatically canceled. As a result, my interface cannot update the order status. Please check for me why it automatically canceled without notifying us.
I have a question about an order, please help me:
When we expired it, it failed. But it hasn’t been more than 24 hours, so why did it expire automatically?
do you have the request id where you expired the Checkout Session?
hmmm, it's alright, nvm, i found the relevant request
req_SdbPKpt1AaU8ch
Is it because we expired him and my developer did not successfully update the expired state?
https://dashboard.stripe.com/payments/pi_3NlpogILBklWVE7i1KtpDxhG - the payment was cancelled because the customer tried too many times
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Is it because the payment was canceled by you on your own initiative? instead of expired
So when I try to expire, it fails. because it has been canceled by you
right?
yep, that's correct
When you cancel proactively, what notification will you send to me?
I need to tell the developer to receive this cancellation notification to update the order status
payment_intent.canceled event will also be sent
Is it also sent to us via webhook?
your current webhook isn't setup to listen for that event, you would need to update your webhook endpoint to listen for this event
how do i update
On the stripe dashboard, click on Developers, click on webhook, then enter, click on the three dots in the upper right corner, and then click on Update Info?
In Events to send, select this event?
right?
before you update your webhook, is your code ready to handle that event?
Do I need to tell the developer to receive this event before I update the endpoint?
no problem,
Developers only need to adjust the code to receive this event. Do they need to make any settings for this webhook?
Stripe expects to receive a 2XX response code from your server when we deliver the event. Otherwise we'll consider that the event delivery failed and attempt to resend
Okay, but there's a problem. After I update this event, will Stripe send me the cancellation status of the order just now? cs_live_a12PhL0ESKaJDQiby8WMBGqnbZ2oR8Agc4dBuQIsUAfsguj006UEoMzKl7
no, it'll only apply to new occurrences
Okay, when the session is canceled by you, besides payment_intent.canceled, are there any other events that I need to listen for?
Together I'll get developers to support
only this? payment_intent. canceled
that's something which you need to discuss with your developers
i wouldn't know how your system works in detail and what other notifications / work you would require for your system to process a cancelled order
That's ok, I just want to make sure because I'm afraid there will be other situations in the future where you guys need to make me listen to other events again that tell me that the session is canceled
I just want to know if listening to payment_intent.canceled can receive any information about the session being cancelled.
How do I get notifications about my session being canceled by you in test mode? How can I simulate this situation?
the payment_intent.canceled event is sent regardless of the session/payment being automatically or manually cancelled. You can probably simulate a similar situation by attempting to pay with a test card that will be declined multiple times : https://stripe.com/docs/testing. Whilst not exactly similar, the easier way to go about it would probably be to just expire the Checkout Session and handle the payment_intent.canceled event
Why did you cancel this order on your own initiative?
pi_3NlpogILBklWVE7i1KtpDxhG
I want to simulate this situation
is this something you just tried or a different ask?
This is an old order and I can't see why it was cancelled,
I want to simulate it in test mode,
Okie let me look in a bit closer
Okie so it's automatically cancelled because the customers tries 10 times
So I just have to pay 10 times in test mode with the declined card and the same thing will happen? 4000000000009995
I think so, have you tried?
no yet
One more question, when we create a checkout session and the customer payment fails, it seems like you guys automatically create a payment again?
No we don't. Why and what do you observe?
A checkout session was created, I tested with the declined card, and a new payment was automatically created, not one we created
Is it different PaymentIntentId ? pi_xxx or the same?
I only see that it is the same checkout session, and I don’t seem to see the others.
"id": "cs_test_a12Fx6gGVjxdVwIUETmw1HP4NQl9xMHoueV8j7pRTMpEjJk1M5R1xivOiE",
When a new payment is created, the ID is "id": "pi_3NmqisILBklWVE7i0xR1fdhq",
to clarify, a Checkout Session has an underlying PaymentIntent. That PaymentIntent is usually created when a customer attempts to confirm the payment
OK
When I create a checkout session, I only receive cs_test_a1wtbLGZZF0eBfJhbctnTjdt0ltudZa7leypnRyGhswaeo7dtQKHJyA5sE, but it seems that this ID is not sent to me: pi_3NmrDgILBklWVE7i1w76kM4A, how can I get him?
These 2 IDs cannot be obtained at the same time when creating a checkout session?
lets take a couple of steps back first
why do you need the PaymentIntent id? what do you want or intend to do with it?
Through pi_3NmrDgILBklWVE7i1w76kM4A, I can see it directly on the stripe dashboard
okay, and what do you want to do with it the PaymentIntent id?
View its details
if you want to retrieve and store the PaymentIntent id, you can get it from the checkout.session.completed webhook
It doesn't matter, I tried searching for cs_test_a1wtbLGZZF0eBfJhbctnTjdt0ltudZa7leypnRyGhswaeo7dtQKHJyA5sE, and I can also see the detailed information, but pi_3NmrDgILBklWVE7i1w76kM4A is more convenient
OK, I have now successfully simulated the situation of being actively canceled by stripe. It sent payment_intent.canceled. My developers need to identify which parameter in it to determine that the order has been cancelled. Is "status": "canceled", ?
just the event name itself already shows that the PaymentIntent is canceled. But if you need the status, yes, that parameter that you highlighted can be used