PayNow

CustomVariableDto

created_atstringRequired
When this custom variable was created.
created_byActorDtoRequired
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
descriptionstringRequired
Description explaining what this custom variable is for. Can be shown to customers.
idFlakeIdRequired
identifierstringRequired
Unique identifier string used to reference this custom variable programmatically. Must contain only letters, numbers, underscores, and hyphens.
namestringRequired
Display name for the custom variable shown to customers.
optionsCustomVariableOptionDto[]Required
Available options for dropdown type custom variables. Empty for text and number types.
custom_variable_idFlakeIdRequired
idFlakeIdRequired
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
Price modification when this option is selected. Interpretation depends on PriceType (fixed amount or percentage).
price_typeenumRequired
Defines how option pricing should be applied to the base product price.
Possible enum values
  • fixed

    Fixed amount added to or subtracted from the base price. Price value represents the exact amount in the smallest currency unit.

  • percentage

    Percentage modification of the base price. Price value represents the percentage (e.g., 150 = 1.5% increase).

sort_orderintegerRequired
Sort order for displaying options to customers. Lower numbers appear first.
store_idFlakeIdRequired
valuestringRequired
Internal value used for product command variable replacement, without brackets.
store_idFlakeIdRequired
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).

updated_atstringOptional
When this custom variable was last updated. Null if never updated.
updated_byActorDtoOptional
typeenumRequired
Possible enum values
  • anonymous
  • user
  • api_key
  • customer
  • game_server
  • internal
  • admin
  • platform
  • global_customer
idFlakeIdOptional
value_regexstringOptional
Optional regex pattern to validate text/number input values. Only applies to text and number types. Uses RE2 syntax - does not support negative lookarounds, backreferences, or other advanced regex features.
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "description": "string",
  "id": "411486491630370816",
  "identifier": "string",
  "name": "string",
  "options": [
    {
      "custom_variable_id": "411486491630370816",
      "id": "411486491630370816",
      "is_default": true,
      "name": "string",
      "price": 0,
      "price_type": "fixed",
      "sort_order": 0,
      "store_id": "411486491630370816",
      "value": "string"
    }
  ],
  "store_id": "411486491630370816",
  "type": "dropdown",
  "value_regex": "string",
  "updated_by": {
    "type": "anonymous",
    "id": "411486491630370816"
  },
  "updated_at": "2024-01-01T00:00:00Z"
}