Checkout throwing this error 422 (Unprocessable Entity)

I am currently still in the testing phase integrating SnipCart into my environment. I have been able to successfully process TEST orders for the last couple of weeks with no issues. All of the sudden starting yesterday 01/24/2022 I kept getting this error message on the console:

422 (Unprocessable Entity)

None of my test transactions are going through anymore. As soon as I enter the test credit card numbers/info and then click on the btn Continue to Payment, the screen just shows the spinner and stays stuck there never fully completing payment. The browser console then shows me this:

POST https://payment.snipcart.com/api/public/sessions 422 (Unprocessable Entity)

Uncaught TypeError: t.indexOf is not a function

They are both pointing to snipcart.js which leads me to think there must have been an update or something on SnipCarts end that caused this behavior perhaps ?

I am still only using the TEST api key which has been working fine this entire time and I have not made any changes to my code. I even tried creating transactions in backups of my project from over a week ago and am still getting the same result (checkout not working).

During some poking around trying to figure out what might be the issue I went on my SnipCart Dashboard and I did notice that in this URL BillingInfo from the beginning I was not setup on any of the plans yet since I haven’t messed around with that screen yet since I am still in testing / development mode. I think I must have maybe clicked something that automatically put me in the Standard subscription plan and its asking me to add credit card and select a payment gateway… I am not 100% sure but I do remember that when this screen used to show that I was not on a plan yet, all my test transactions were working…

1 Like

I am also having this issue:
https://support.snipcart.com/t/next-js-stuck-at-checkout-422-unprocessable-entity-error/960

Hey yeah I haven’t been able to solve it yet either, I’ve rolled back to earlier versions of my project where things were working before and see that checkout is now broken even on those earlier copies if my entire project.

Just curious about what you see on this url when you check your billing information. Does it still show that you haven’t selected a plan yet or is it showing that you are on the standard plan? I am not 100% sure but I remember that screen showing that I was not on a plan yet and the transactions were working. Then when they stopped working I noticed that it was showing I was on the standard plan. Again I could be totally wrong, just something I noticed and thought it was worth mentioning. Login - Snipcart

Hey, It says the same for me that i’m on the standard plan without touching anything.

Ive double checked this by making a new Snipcart account & dashboard - it appears that its on the standard plan by default, and still throws the same error when I change the public API key to the one from the fresh account. So i still think its something to do with the Snipcart servers.

Im kinda glad its not just me, was going round in circles yesterday figuring out if I broke something.

Hopefully theres a solution for this soon!

Oh cool that’s good to know that by default it shows standard plan, for some reason I kept thinking otherwise. Also yes I agree, I think it has to do with something on their end. I have emailed them as well so just waiting on a response. Hopefully we hear back soon.

1 Like

Hi,
I’m also having this problem but only since yesterday.
Everything was working fine a few days ago.

Hey guys I just received an email reply from support and they said they have escalated the issue to the dev team and they are working on it. If all goes well it can be resolved by the end of the day. If not then we know they are aware and all should be well as soon as they find a solution.

Just a quick update to those who were having this issue:

The support team has fixed the problem and it should be working again. I tried on my project and its as good as new. It ended up being due to some changes that they implemented on an update, but all is working now.