#renlaer057

1 messages · Page 1 of 1 (latest)

gray masonBOT
waxen falcon
#

hello! yes, you will receive a webhook event as well

scarlet crescent
#

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

waxen falcon
#

can you share the event id?

scarlet crescent
#

"id": "evt_3NmcBvILBklWVE7i0ymVXHYk",

#

I wrote Refund Reason: Duplicate, but I can't seem to find a field about duplicates in the webhook event

waxen falcon
scarlet crescent
#

Well, do you need me to take the initiative to inquire?

waxen falcon
#

i'm sorry, i'm not sure i understand your question?

scarlet crescent
#

We need to use the query refund list interface to know the reason for the refund, right?

waxen falcon
#

yes, you need to retrieve the Refund object

scarlet crescent
#

OK,thanks

#

By the way, how do I repeatedly send refund webhook callbacks to our API in the stripe dashboard?

waxen falcon
#

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?

scarlet crescent
#

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.

waxen falcon
#

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?

scarlet crescent
#

yes

waxen falcon
#

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

scarlet crescent
#

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?

waxen falcon
#

do you have the request id where you expired the Checkout Session?

#

hmmm, it's alright, nvm, i found the relevant request

scarlet crescent
#

req_SdbPKpt1AaU8ch

#

Is it because we expired him and my developer did not successfully update the expired state?

waxen falcon
scarlet crescent
#

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?

waxen falcon
#

yep, that's correct

scarlet crescent
#

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

waxen falcon
#

payment_intent.canceled event will also be sent

scarlet crescent
#

Is it also sent to us via webhook?

waxen falcon
#

your current webhook isn't setup to listen for that event, you would need to update your webhook endpoint to listen for this event

scarlet crescent
#

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?

waxen falcon
#

before you update your webhook, is your code ready to handle that event?

scarlet crescent
#

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?

waxen falcon
#

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

scarlet crescent
#

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

waxen falcon
#

no, it'll only apply to new occurrences

scarlet crescent
#

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

waxen falcon
#

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

scarlet crescent
#

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?

gray masonBOT
waxen falcon
#

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

Use test cards to validate your Stripe integration without moving real money. Test a variety of international scenarios, including successful and declined payments, card errors, disputes, and bank authentication. You can also test non-card payment methods and redirects.

scarlet crescent
#

Why did you cancel this order on your own initiative?

#

pi_3NlpogILBklWVE7i1KtpDxhG

#

I want to simulate this situation

late sapphire
#

is this something you just tried or a different ask?

scarlet crescent
#

This is an old order and I can't see why it was cancelled,

#

I want to simulate it in test mode,

late sapphire
#

Okie let me look in a bit closer

#

Okie so it's automatically cancelled because the customers tries 10 times

scarlet crescent
#

So I just have to pay 10 times in test mode with the declined card and the same thing will happen? 4000000000009995

late sapphire
#

I think so, have you tried?

scarlet crescent
#

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?

late sapphire
#

No we don't. Why and what do you observe?

scarlet crescent
#

A checkout session was created, I tested with the declined card, and a new payment was automatically created, not one we created

late sapphire
#

Is it different PaymentIntentId ? pi_xxx or the same?

scarlet crescent
#

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",

waxen falcon
#

to clarify, a Checkout Session has an underlying PaymentIntent. That PaymentIntent is usually created when a customer attempts to confirm the payment

scarlet crescent
#

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?

waxen falcon
#

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?

scarlet crescent
#

Through pi_3NmrDgILBklWVE7i1w76kM4A, I can see it directly on the stripe dashboard

waxen falcon
#

okay, and what do you want to do with it the PaymentIntent id?

scarlet crescent
#

View its details

waxen falcon
#

if you want to retrieve and store the PaymentIntent id, you can get it from the checkout.session.completed webhook

scarlet crescent
#

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", ?

waxen falcon
#

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