What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Checkout failing - HTTP 422 through Checkout API

Checkout failing - HTTP 422 through Checkout API

JCDY
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.

Reply 1 (1)

hassain
Shopify Staff (Retired)
624 104 189

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. 

 

To learn more visit the Shopify Help Center or the Community Blog.