I am facing below error while placing an order on Magento 2 store with payment method Cash On Delivery.
POST http://yoursite.com/rest/ae_en/V1/carts/mine/payment-information 400 (Bad Request)
Is there anyone who faced same issue?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
Please check root_dir/var/report/api folder if exist or root_dir/var/exception.log file you will get the reason probably.
400 bad request could mean all sort of things. When encountered in the checkout it's usually some required fields that are missing. You should enable developer mode and try to track back the error. Chances are that you will get a 500 server error with an exception that reveals the path.
I've had this error also a couple of times when using the Checkout REST API, and in my case it was a missing phone number from my shipping address. Some checkout modules allow to hide the phone number from checkout and whilst this will pass most validation steps it will throw an exception when trying to save the address. However, this exception might be hard to catch because the API might say something like 'something is wrong' and masking the original exception.
In my case, it is fixed by adding new values in database. You can also try
Goto Magento database and open table sequence_order_1 and set 2 new value to the database like currently if your table shows 10 as last value, so Insert 11, 12 as new values