#nicky_webhooks

1 messages · Page 1 of 1 (latest)

solid siloBOT
#

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

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

#

⛔️ Stripe developers have stepped away for a short while

Please leave your questions here, and we’ll respond as soon as we're back! If you need help urgently, you can contact Stripe support for help.

solid siloBOT
silent bronze
#

Hi! Looking into your query!

#

There isn't a way to delay the charge.succeeded event once the charge is successful. Can you elaborate more about what you're attempting to do?

keen python
#

I can add items to my cart, start a Stripe checkout session, use the back navigation button and remove items from my cart. If I copy and paste the session URL, the original items are on the Stripe checkout form and not the updated cart items. This causes a mismatch, but I have it setup to catch it and auto issue a refund. I still get charged Stripe fees. I am handling possible override errors.

silent bronze
#

To confirm, when you click back from checkout session A to remove items from the cart, are you then redirecting the customer to checkout session A using the same URL?

#

but I have it setup to catch it and auto issue a refund
How do you catch it?

keen python
#

The customer would have to copy and paste the URL to get back to checkout session A as forward navigation is not an option. It would technically need to be intentional instead of using the checkout button after changing the cart. I have a function that compares the items purchased to the changed cart items and issues a refund.

silent bronze
#

Why not create a new checkout session that reflects the updated cart items?

keen python
#

Anew checkout session does occur if the customer continues with the checkout button after changing the cart, but I am handling possible override issues. The issue is if a customer copies and paste the original session URL instead of using the checkout button again, which would send an alert that the items changed and would update what is purchased.

#

There seems to not be a point between a customer pressing the pay button and charge.succeeded that would allow a mismatch check in an override situation.

silent bronze
#

I see.. There isn't a way to delay events in Stripe. Events are designed to deliver as soon as they occur.

keen python
#

The pay button only has the charge.succeeded event I can connect to it?

silent bronze
#

Sorry what do you mean?

keen python
#

Once a user presses the pay button, it goes directly to the charge.succeeded event? There is not another event I can add between the payment button being pressed and the charge.updated event?

silent bronze
#

Yes, as long as the payment succeeds there will be a charge.succeeded event. You can't add another event in between.

keen python
#

Alright. Since it would need to be an intentional override, I can keep a disclosure on the checkout form and include it in the metadata to prepare for charge disputes.

silent bronze
#

Can I also understand how are you using the charge.succeeded event?

keen python
#

It is included with payment.

#

Everything after that is handled on my frontendunless a refund needs to be issued.

silent bronze
#

It is included with payment.
I am not sure what do you mean. Are you using the charge.succeeded event to do something or are trying to see how you can delay the payment after the customer clicks on the pay button on the hosted checkout to do the checks on the items?

keen python
#

I saw there is not a way to delay the charge, so I was seeking alternative solutions. Originally, I was wanting to know if I can delay the charge after clicking pay to check the items.