I have upgraded the Magento version to 2.3.7. After that, I have a strange issue on the checkout page that when it calls the ajax function the URL is been wrongly generated. Previously it was like


but after upgrading the Magento version now it's


Not sure from where this undefined gets added within the URL ??

Research Notes: -

The secure & unsecure base URL is correctly set up. I checked it again

Also, I navigated to the file from where this ajax call is generated, the file is


enter image description here

Here is the storage. post is from the ajax call is generated and it has service URL & payload as arguments.

in get Rates function - if we console.log "serviceUrl" then it shows the below URL


which seem to be correct, storage.post() function takes this as an argument and ajax request is called which then gets into the .fail() function

so what I think is that the problem is where the front part of the URL gets added to it for making the ajax call that is http://sitename.local/checkout/undefined ---> and here somehow the undefined gets added which breaks the whole URL

The same issue is encountered by other users also but no solution is available yet.

undefined rest api checkout cart


Can anyone help me out with this?

1 Answer 1


You can try the following ways.

  1. Take the entire checkout module from the same fresh magento version.

  2. Try to do the magento upgrade again with composer.

So if any mistake remain into upgrade can be resolve.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.