less than a minute read • Updated 9 minutes ago
Confirm inventory before checkout with the pre-payment webhook
How to use Foxy's pre-payment webhook to check product stock right before checkout completes, preventing overselling between cart and payment.
Use the pre-payment webhook to confirm a product’s stock is still available right before a customer completes checkout, closing the gap between when a product is added to the cart and when the order actually goes through.
How to set it up
Notes
You can also use the Foxy API to modify the cart directly from your endpoint — for example, removing or updating products before sending the customer back to the checkout. The pre-payment webhook payload includes the URIs needed to interact with those resources.
This check matters most for stores with higher transaction volume, or where a customer might add a product to their cart and not complete checkout until hours or days later — giving stock levels more time to change in the meantime.
See the pre-payment webhook payload reference for the full list of data included in the request.