Storefront API CheckoutCreate Without Adding Lines Without A VariantId

Storefront API CheckoutCreate Without Adding Lines Without A VariantId


0

We have a downstream application which manages inventory and products but we’d like to use Shopify Cart and Checkout for the functionality it has, third party apps, discount code, coupons, abandoned cart reporting and security but do not want to manage inventory or store my products on Shopify.

I am using the Storefront API checkoutCreate but the line items require a variantId, is there a way I can submit the product title(name) and price without using the build in Product module of Shopify?

I’d like to do something similar to the below..

mutation checkoutCreate($input: CheckoutCreateInput!) {
  checkoutCreate(input: $input) {
    checkout {
      id,
      webUrl
    }
    checkoutUserErrors {
        message
    }
    queueToken
  }
}

variables:

{
  "input": {
    "allowPartialAddresses": true,
    "buyerIdentity": {
      "countryCode": "US"
    },
    "email": "[email protected]",
    "lineItems": [
      {
        "customAttributes": [
          {
            "key": "Title",
            "value": "Hello"
          }
        ],
        "title": "Title",
        "price": "100",
        "quantity": 1
      }
    ]
  }
}

Share

1 Answer
1

Reset to default


0

From my research I have concluded that this is not possible

Share



Not the answer you're looking for? Browse other questions tagged

or ask your own question.

Leave a Reply

Your email address will not be published. Required fields are marked *