We have a Discounts App which generates a discount code and appends it to the URL.
When the cart includes a product with partial stock, Shopify prompts the customer in the /checkout section that the cart was updated with the maximum available number of stocked products. The problem is that the discount code generated by our app, despite the fact that it was created for the correct amount of products, the URL parameter is not persistent without a manual page refresh (see attachment).
Merchants are blaming our app for this behavior, but our app has no control in the checkout section. Please help us with a resolution or a temporary workaround for such cases.
customer adds to cart 6 pieces of a product that only has 5 pieces available in the inventory
customer reaches checkout with a discount code generated by our discount app in the URL (discount is generated only for the 5 available products)
customer clicks the "Continue" button to update the cart with the new available quantity
the discount code is not applied to the checkout after the cart is adjusted and checkout reloaded