← Back to results
CriticalConfirmed
Checkout fails after applying a discount code
Description
Applying a discount code at checkout triggers a server error and the order cannot be completed.
Steps to reproduce
- Open https://demo-shop.example.com/cart
- Add an item to the cart
- Apply discount code TEST20
- Click Pay
Expected result
The discount is applied and the order total is updated.
Actual result
The request fails with HTTP 500 and the checkout page shows a spinner indefinitely.
Evidence
Page URL: https://demo-shop.example.com/checkout
Timestamp: Wed, 15 Jan 2025 10:02:12 GMT
POST https://demo-shop.example.com/api/checkout/discount → 500
{"error":"Internal Server Error"}