Checkout failing - HTTP 422 through Checkout API

Highlighted
New Member
5 0 0

Using our Sales Channel and the Checkout API we got the following response back from Shopify

	"statusCode": 422,
	"body": {
		"errors": {
			"checkout": {
				"shipping_line": {
					"id": [{
						"code": "invalid",
						"message": "is invalid",
						"options": {}
					}]
				},
				"shipping_rate": {
					"id": [{
						"code": "invalid",
						"message": "is invalid",
						"options": {}
					}]
				}
			}
		}
	}

The request-id is 

"x-request-id": "51f2aa61-2e60-459c-9943-330dc6c0629e"

I'd like to know what does that error mean. Thank you.

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
624 103 124

Hey @JCDY ,

 

Thank you for providing the error message and the X-Request-ID value, it was very helpful for the investigation.

 

After going through our platform logs, it appears this error was thrown because the 'ShippingLineValidator' failed to validate the shipping line of the checkout. This could be because the shipping line is missing from your checkout, or because the shipping rate that is selected in the shipping line is missing or is invalid. Alternatively there could be a typo or incorrect input in your shipping line, which is causing the validator to fail. 

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes