Shipping CODE Discount Function - Checkout Error

Hi Topshop,

It’s possible this issue is being caused by an internal server error occurring on Shopify’s end when applying the discount code at checkout, which I’m looking into.

In the meantime, there’s a couple things you could do to troubleshoot this:

  1. Confirm Functionality: Create a different function that performs a simpler task, such as a simple discount on a product, and apply it to a discount code. If this works, it points towards a specific issue with applying this shipping discount via a Shopify function.

  2. Test the Checkout Flow: Perform tests on your checkout flow. Create different types of discounts, apply them, and proceed to checkout. See if the issue arises with any other discounts or only with the shipping discount.

  3. Validate the Function: Double-check the function and ensure that it’s correctly written and follows all necessary guidelines. This includes the structure of the function and its syntax.

If you check these, I’ll also look into things on our side so see what might be causing this. Hope this helps,