#wreck_it.

1 messages · Page 1 of 1 (latest)

elfin flowerBOT
storm steeple
#

The status you send back to Stripe should always be 200 if you successfully received the webhook. All that indicates is the receipt of the webhook. Sending back a failed request error (or similar) doesn't have any effect on the payment or any of the non-Event objects involved (e.g. you can't refund a payment by sending a webhook failure back to Stripe)

#

Webhooks are just a notification system

#

that you can use to create your own actions on your server

sand badger
#

Dang. That makes sense though. Is there a common why you see where developers check the status of an inventory? Or update it?

#

common place*

#

Because I want to reject the payment if for some reason the item is out of stock while paying for the item.

#

If that sort of thing is outside your support I totally understand. Just wanted to see if you knew of a quick tip.

storm steeple
#

We can't give specific steps about how to do it, but I would reccomend that you check inventory before sending the Customer to Checkout

sand badger
#

Right. That makes sense. Just sort of hard to handle checkout timeouts or stopping a user from technically reserving all the inventory during their checkout.

#

I'll do some research though. Thank you for your time. Appreciate you guys being accessible.

storm steeple
#

Happy to help! I'd recommend setting a cookie with a timer on it so that a customer can have only X number of inventory items, and they have X minutes to complete their order before they surrender that inventory