# Custom Variables

## Get custom variables

> Retrieves all custom variables for the specified store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"custom-variables"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomVariableDto":{"required":["created_at","created_by","description","id","identifier","name","options","store_id","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"Unique identifier string used to reference this custom variable programmatically.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name for the custom variable shown to customers."},"description":{"type":"string","description":"Description explaining what this custom variable is for. Can be shown to customers."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern to validate text/number input values.\nOnly applies to text and number types.\nUses RE2 syntax - does not support negative lookarounds, backreferences, or other advanced regex features."},"options":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableOptionDto"},"description":"Available options for dropdown type custom variables.\nEmpty for text and number types."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"When this custom variable was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"When this custom variable was last updated.\nNull if never updated.","format":"date-time"}},"additionalProperties":false},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"CustomVariableOptionDto":{"required":["custom_variable_id","id","is_default","name","price","price_type","sort_order","store_id","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variable_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Price modification when this option is selected.\nInterpretation depends on PriceType (fixed amount or percentage).","format":"int64"},"price_type":{"$ref":"#/components/schemas/CustomVariableOptionPriceType"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false},"CustomVariableOptionPriceType":{"enum":["fixed","percentage"],"type":"string","description":"Defines how option pricing should be applied to the base product price."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/custom-variables":{"get":{"tags":["custom-variables"],"summary":"Get custom variables","description":"Retrieves all custom variables for the specified store.","operationId":"CustomVariables_GetCustomVariablesForStore","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to retrieve custom variables for.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableDto"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Create custom variable

> Creates a new custom variable for the specified store.\
> Custom variables allow customers to provide additional input when purchasing products.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"custom-variables"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertCustomVariableRequestDto":{"required":["identifier","name","options","type"],"type":"object","properties":{"identifier":{"type":"string","description":"Unique identifier string for programmatic reference.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name shown to customers."},"description":{"type":["null","string"],"description":"Description explaining the purpose of this custom variable."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern for validating customer input.\nOnly applies to text and number types. Ignored for dropdown types."},"options":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableOptionRequestDto"},"description":"Predefined options for dropdown-type custom variables.\nRequired for dropdown types, ignored for text and number types.\nWhen updating, this completely replaces all existing options."}},"additionalProperties":false,"description":"Unified request model for creating or updating custom variables.\nContains all the configurable properties of a custom variable."},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"CustomVariableOptionRequestDto":{"required":["is_default","name","price","price_type","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"The value the command variable will be replaced with."},"price":{"type":"integer","description":"Price modification when this option is selected.\nInterpretation depends on PriceType (fixed amount or percentage).\nIf fixed, the value is in cents, if a percentage, in permille.","format":"int64"},"price_type":{"$ref":"#/components/schemas/CustomVariableOptionPriceType"},"is_default":{"type":"boolean","description":"Whether this option is selected by default.\nOnly one option per custom variable should be marked as default."}},"additionalProperties":false,"description":"Request model for defining custom variable options.\nUsed within UpsertCustomVariableRequestDto for dropdown-type variables."},"CustomVariableOptionPriceType":{"enum":["fixed","percentage"],"type":"string","description":"Defines how option pricing should be applied to the base product price."},"CustomVariableDto":{"required":["created_at","created_by","description","id","identifier","name","options","store_id","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"Unique identifier string used to reference this custom variable programmatically.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name for the custom variable shown to customers."},"description":{"type":"string","description":"Description explaining what this custom variable is for. Can be shown to customers."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern to validate text/number input values.\nOnly applies to text and number types.\nUses RE2 syntax - does not support negative lookarounds, backreferences, or other advanced regex features."},"options":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableOptionDto"},"description":"Available options for dropdown type custom variables.\nEmpty for text and number types."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"When this custom variable was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"When this custom variable was last updated.\nNull if never updated.","format":"date-time"}},"additionalProperties":false},"CustomVariableOptionDto":{"required":["custom_variable_id","id","is_default","name","price","price_type","sort_order","store_id","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variable_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Price modification when this option is selected.\nInterpretation depends on PriceType (fixed amount or percentage).","format":"int64"},"price_type":{"$ref":"#/components/schemas/CustomVariableOptionPriceType"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/custom-variables":{"post":{"tags":["custom-variables"],"summary":"Create custom variable","description":"Creates a new custom variable for the specified store.\nCustom variables allow customers to provide additional input when purchasing products.","operationId":"CustomVariables_CreateCustomVariableForStore","parameters":[{"name":"storeId","in":"path","description":"The ID of the store to create the custom variable in.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"description":"The custom variable data to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertCustomVariableRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertCustomVariableRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertCustomVariableRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomVariableDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Get custom variable

> Retrieves a specific custom variable by ID from the specified store.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"custom-variables"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"CustomVariableDto":{"required":["created_at","created_by","description","id","identifier","name","options","store_id","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"Unique identifier string used to reference this custom variable programmatically.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name for the custom variable shown to customers."},"description":{"type":"string","description":"Description explaining what this custom variable is for. Can be shown to customers."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern to validate text/number input values.\nOnly applies to text and number types.\nUses RE2 syntax - does not support negative lookarounds, backreferences, or other advanced regex features."},"options":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableOptionDto"},"description":"Available options for dropdown type custom variables.\nEmpty for text and number types."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"When this custom variable was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"When this custom variable was last updated.\nNull if never updated.","format":"date-time"}},"additionalProperties":false},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"CustomVariableOptionDto":{"required":["custom_variable_id","id","is_default","name","price","price_type","sort_order","store_id","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variable_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Price modification when this option is selected.\nInterpretation depends on PriceType (fixed amount or percentage).","format":"int64"},"price_type":{"$ref":"#/components/schemas/CustomVariableOptionPriceType"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false},"CustomVariableOptionPriceType":{"enum":["fixed","percentage"],"type":"string","description":"Defines how option pricing should be applied to the base product price."},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/custom-variables/{customVariableId}":{"get":{"tags":["custom-variables"],"summary":"Get custom variable","description":"Retrieves a specific custom variable by ID from the specified store.","operationId":"CustomVariables_GetCustomVariableByIdForStore","parameters":[{"name":"storeId","in":"path","description":"The ID of the store the custom variable belongs to.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customVariableId","in":"path","description":"The ID of the custom variable to retrieve.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomVariableDto"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Delete custom variable

> Deletes a custom variable from the specified store.\
> This will also delete all associated options and cannot be undone.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"custom-variables"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/custom-variables/{customVariableId}":{"delete":{"tags":["custom-variables"],"summary":"Delete custom variable","description":"Deletes a custom variable from the specified store.\nThis will also delete all associated options and cannot be undone.","operationId":"CustomVariables_DeleteCustomVariableForStore","parameters":[{"name":"storeId","in":"path","description":"The ID of the store the custom variable belongs to.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customVariableId","in":"path","description":"The ID of the custom variable to delete.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"responses":{"204":{"description":"No Content"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```

## Update custom variable

> Performs a partial update of a custom variable using field mask.\
> Only the fields specified in the request will be updated.

```json
{"openapi":"3.1.1","info":{"title":"PayNow Management API","version":"v1"},"tags":[{"name":"custom-variables"}],"security":[{"APIKey":[]}],"components":{"securitySchemes":{"APIKey":{"type":"apiKey","description":"An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.","name":"Authorization","in":"header"}},"schemas":{"FlakeId":{"type":"string","additionalProperties":false,"format":"flake-id"},"UpsertCustomVariableRequestDto":{"required":["identifier","name","options","type"],"type":"object","properties":{"identifier":{"type":"string","description":"Unique identifier string for programmatic reference.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name shown to customers."},"description":{"type":["null","string"],"description":"Description explaining the purpose of this custom variable."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern for validating customer input.\nOnly applies to text and number types. Ignored for dropdown types."},"options":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableOptionRequestDto"},"description":"Predefined options for dropdown-type custom variables.\nRequired for dropdown types, ignored for text and number types.\nWhen updating, this completely replaces all existing options."}},"additionalProperties":false,"description":"Unified request model for creating or updating custom variables.\nContains all the configurable properties of a custom variable."},"CustomVariableType":{"enum":["dropdown","text","number"],"type":"string","description":"Defines the type of input method for a custom variable."},"CustomVariableOptionRequestDto":{"required":["is_default","name","price","price_type","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"The value the command variable will be replaced with."},"price":{"type":"integer","description":"Price modification when this option is selected.\nInterpretation depends on PriceType (fixed amount or percentage).\nIf fixed, the value is in cents, if a percentage, in permille.","format":"int64"},"price_type":{"$ref":"#/components/schemas/CustomVariableOptionPriceType"},"is_default":{"type":"boolean","description":"Whether this option is selected by default.\nOnly one option per custom variable should be marked as default."}},"additionalProperties":false,"description":"Request model for defining custom variable options.\nUsed within UpsertCustomVariableRequestDto for dropdown-type variables."},"CustomVariableOptionPriceType":{"enum":["fixed","percentage"],"type":"string","description":"Defines how option pricing should be applied to the base product price."},"CustomVariableDto":{"required":["created_at","created_by","description","id","identifier","name","options","store_id","type"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"identifier":{"type":"string","description":"Unique identifier string used to reference this custom variable programmatically.\nMust contain only letters, numbers, underscores, and hyphens."},"name":{"type":"string","description":"Display name for the custom variable shown to customers."},"description":{"type":"string","description":"Description explaining what this custom variable is for. Can be shown to customers."},"type":{"$ref":"#/components/schemas/CustomVariableType"},"value_regex":{"type":["null","string"],"description":"Optional regex pattern to validate text/number input values.\nOnly applies to text and number types.\nUses RE2 syntax - does not support negative lookarounds, backreferences, or other advanced regex features."},"options":{"type":"array","items":{"$ref":"#/components/schemas/CustomVariableOptionDto"},"description":"Available options for dropdown type custom variables.\nEmpty for text and number types."},"created_by":{"$ref":"#/components/schemas/ActorDto"},"created_at":{"type":"string","description":"When this custom variable was created.","format":"date-time"},"updated_by":{"$ref":"#/components/schemas/ActorDto"},"updated_at":{"type":["null","string"],"description":"When this custom variable was last updated.\nNull if never updated.","format":"date-time"}},"additionalProperties":false},"CustomVariableOptionDto":{"required":["custom_variable_id","id","is_default","name","price","price_type","sort_order","store_id","value"],"type":"object","properties":{"id":{"$ref":"#/components/schemas/FlakeId"},"store_id":{"$ref":"#/components/schemas/FlakeId"},"custom_variable_id":{"$ref":"#/components/schemas/FlakeId"},"name":{"type":"string","description":"Display name shown to customers for this option."},"value":{"type":"string","description":"Internal value used for product command variable replacement, without brackets."},"price":{"type":"integer","description":"Price modification when this option is selected.\nInterpretation depends on PriceType (fixed amount or percentage).","format":"int64"},"price_type":{"$ref":"#/components/schemas/CustomVariableOptionPriceType"},"is_default":{"type":"boolean","description":"Whether this option is selected by default when the custom variable is presented.\nOnly one option per custom variable should be marked as default."},"sort_order":{"type":"integer","description":"Sort order for displaying options to customers.\nLower numbers appear first.","format":"int32"}},"additionalProperties":false},"ActorDto":{"required":["type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/PayNowActorType"},"id":{"$ref":"#/components/schemas/FlakeId"}},"additionalProperties":false},"PayNowActorType":{"enum":["anonymous","user","api_key","customer","game_server","internal","admin","platform","global_customer"],"type":"string"},"PayNowError":{"required":["code","message","status"],"type":"object","properties":{"status":{"type":"integer","description":"The HTTP status code.","format":"int32"},"code":{"type":"string","description":"The PayNow parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"trace_id":{"type":["null","string"],"description":"A distributed trace ID used for debugging."},"errors":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ValidationError"},"description":"An array of multiple errors. Only used by some API services."}},"additionalProperties":false,"description":"Represents a PayNow error"},"ValidationError":{"required":["code","message","path","validation"],"type":"object","properties":{"code":{"type":"string","description":"The parseable error code."},"message":{"type":"string","description":"The human-readable error message."},"path":{"type":"string","description":"The path leading to the validation error."},"validation":{"type":"string","description":"Type of the validation that failed."}},"additionalProperties":false,"description":"A validation error."}}},"paths":{"/v1/stores/{storeId}/custom-variables/{customVariableId}":{"patch":{"tags":["custom-variables"],"summary":"Update custom variable","description":"Performs a partial update of a custom variable using field mask.\nOnly the fields specified in the request will be updated.","operationId":"CustomVariables_UpdateCustomVariableForStore","parameters":[{"name":"storeId","in":"path","description":"The ID of the store the custom variable belongs to.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}},{"name":"customVariableId","in":"path","description":"The ID of the custom variable to update.","required":true,"schema":{"$ref":"#/components/schemas/FlakeId"}}],"requestBody":{"description":"The custom variable data to update with field mask.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertCustomVariableRequestDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpsertCustomVariableRequestDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpsertCustomVariableRequestDto"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomVariableDto"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayNowError"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paynow.gg/management/management-api/custom-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
