Skip to main content
This guide explains how to specify product variants when submitting an order through the API, ensuring the correct options are selected for each purchase.

Retrieving variant information

Use the product lookup endpoint to retrieve available variants for a product:

Using variantSelections

When creating a checkout intent, pass the option labels and values from the product data:
  • Labels are matched with minor fuzzy tolerance (e.g., “Colour” will match “Color”), but values must match exactly (case-insensitive).
  • If no variant matches the provided selections, the API returns a variant_selections_invalid error.
  • When variantSelections is provided, it takes precedence over any variant ID embedded in the productUrl.
  • Selections are matched against the options of the product at productUrl. If that product doesn’t have the option, the API returns variant_selections_invalid, even when the URL already names a variant.
Alternatively, you can provide a productUrl that points directly to the correct variant. If the URL already includes the variant identifier, you don’t need to include variantSelections. If your catalog stores a separate URL for each variant, as a product group does, send that URL without variantSelections.

Notes

  • You only need one approach — either variantSelections or a variant-specific URL. If both are provided, variantSelections takes precedence.