🐞AI Bug Hunter
← 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

  1. Open https://demo-shop.example.com/cart
  2. Add an item to the cart
  3. Apply discount code TEST20
  4. 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

Screenshot of the bug

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