PayNow

CartLineCustomVariableDto

descriptionstringRequired
The description of the custom variable
idFlakeIdRequired
identifierstringRequired
The unique identifier string for the custom variable
namestringRequired
The display name of the custom variable
optionsStorefrontCustomVariableOptionDto[]Required
The collection of available options for this custom variable. Only present for dropdown type
is_defaultbooleanRequired
Whether this option is selected by default when the custom variable is presented. Only one option per custom variable should be marked as default.
namestringRequired
Display name shown to customers for this option.
priceintegerRequired
Additional price in the lowest denominator (e.g. cents) when this option is selected.
sort_orderintegerRequired
Sort order for displaying options to customers. Lower numbers appear first.
valuestringRequired
Internal value used for product command variable replacement, without brackets.
typeenumRequired
Defines the type of input method for a custom variable.
Possible enum values
  • dropdown

    Dropdown selection with predefined options. Customers choose from a list of available options. Allows for additional pricing based on the selected entry.

  • text

    Free-form text input. Customers can enter any text value (subject to validation).

  • number

    Numeric input. Customers can enter numeric values (subject to validation).

valuestringRequired
The selected value of the custom variable
selected_optionStorefrontCustomVariableOptionDtoOptional
is_defaultbooleanRequired
Whether this option is selected by default when the custom variable is presented. Only one option per custom variable should be marked as default.
namestringRequired
Display name shown to customers for this option.
priceintegerRequired
Additional price in the lowest denominator (e.g. cents) when this option is selected.
sort_orderintegerRequired
Sort order for displaying options to customers. Lower numbers appear first.
valuestringRequired
Internal value used for product command variable replacement, without brackets.
Example
{
  "description": "string",
  "id": "411486491630370816",
  "identifier": "string",
  "name": "string",
  "options": [
    {
      "is_default": true,
      "name": "string",
      "price": 0,
      "sort_order": 0,
      "value": "string"
    }
  ],
  "type": "dropdown",
  "value": "string",
  "selected_option": {
    "is_default": true,
    "name": "string",
    "price": 0,
    "sort_order": 0,
    "value": "string"
  }
}