Checkout create error

Hi!
I have sales channel app, which has feature or creating checkouts.

We doing this via GraphQL mutation and it’s ok :

mutation {
      checkoutCreate(input: {
        lineItems: [{variantId: "BASE64_VARIANT_ID", quantity: 1},]
      }) {
        checkout {
           id
           webUrl
        }
        checkoutUserErrors {
          code
          field
          message
        }
      }
    }

But it seems that sometimes it working strange - on some shops we receive error

[{'code': 'INVALID', 'field': ['input', 'lineItems', '0', 'variantId'], 'message': 'Variant is invalid'}]

And it’s okay, but when I try to put this items in the cart and make checkout via shopify website - everything is going good.

The product has “Continue selling when out of stock” enabled, and variant is exists in the dashboard.
What can cause this problem ?

Hey Bajun - thanks for getting in touch. The most common reason this can happen is if the variant isn’t published/made available on your sales channel. If the issue still persists after you can confirm the variant is available on the sales channel, just repost here with an X-Request-ID from the response header of one of the “variant is invalid” responses you receive from Shopify and we’d be happy to look further into this with you.

Hope this helps!

Hi Alan!

Yeah, that was the reason - another app wiped all sales channels from the product and we missed it.

Thank you for your help!