Variant is invalid

tkgc
New Member
1 0 0

I'm using shopify js-buy-sdk with react

i'm converting my variant id using Buffer.from(`gid://shopify/ProductVariant/${id}`).toString('base64') and providing it to

const lineItemsToAdd = [
        {variantId : id , quantity: parseInt(quantity, 10)},
      ];
 
and then -
  const checkout = await client.checkout.addLineItems(
        this.state.checkout.id,
        lineItemsToAdd
      );
 
but I'm getting this error

1.png

 

 
Reply 1 (1)
daniel-florez
New Member
1 0 0

Were you able to solve it? Did you enable the product to the proper Sale Channel?