I followed the steps here to setup snipcart here
and when I call the JS SDK function below (Snipcart.api.cart.items.add) I got
snipcart.js:1 POST https://app.snipcart.com/api/cart 500
try {
Snipcart.api.cart.items.add({
id: tileStyle,
name: "Tile1",
image: imageCropped,
price: tilePrice,
quantity: quantity,
stackable: "always",
url: "/products/" + tileStyle
}).then(function (item) {
console.log("addToCart initCheckout");
Snipcart.api.theme.cart.open();
}
});
} catch (error) {
console.log(error);
}