# Create a deposit amount strategy Creates a deposit amount strategy. Use deposit amount strategies to determine the amounts presented to customers in deposit forms, based on currency, customer segmentation (tags), or prior deposit behavior. Selection of deposit amount strategy: - If more than one deposit amount strategy applies to a deposit request, the deposit amount strategy with the greater value is applied. - If the property is specified when a deposit request is created, the specified deposit amount strategy is applied. All other deposit amount strategies are ignored. Default behavior: - If the property is not specified when a deposit request is created, amount restrictions are determined from the chosen deposit amount strategy. - If the property is not specified when a deposit request is created, amounts are determined from the chosen deposit amount strategy. Endpoint: POST /deposit-strategies Version: latest Security: SecretApiKey, JWT ## Request fields (application/json): - `name` (string, required) Name of the deposit amount strategy. - `filter` (string) Filter that uses deposit request properties to determine if a deposit amount strategy is applicable for the deposit request. If this field is empty, the deposit amount strategy is applicable for any request. Example: "depositRequest.currency:USD" - `amounts` (object, required) Amounts configuration for deposit amount strategy. - `amounts.calculator` (string, required) Deposit amounts calculator. This field specifies if amounts are calculated using an absolute or percentage calculation. Amounts are specified in , and increments are specified in . Example: and . - If the calculator is set to : the amounts displayed to the customer are . - If the calculator is set to : the amounts displayed to the customer are . Enum: "absolute", "percent" - `amounts.baseAmount` (number, required) First amount that is displayed to customer. - `amounts.increments` (array, required) List of incremental amounts that are displayed to customer. For more information, see the [ property](https://www.rebilly.com/catalog/all/deposits/postdepositstrategy#deposits/postdepositstrategy/t=request&path=amounts/calculator). - `amounts.adjustBaseToLastDeposit` (boolean) Specifies if the base amount must be adjusted based on the last deposit. If this value is , the is changed to the last successful deposit amount made using [Create a deposit request](https://www.rebilly.com/catalog/all/deposits/postdepositrequest). If the customer has no successful deposits, is not adjusted. - `customAmount` (object,null, required) Custom amount restrictions. If this value is , custom amounts are prohibited. If is not specified when a deposit request is created, amount restrictions are determined from the chosen deposit amount strategy. For more information, see the [ property](https://www.rebilly.com/catalog/all/deposits/postdepositrequest#deposits/postdepositrequest/t=request&path=strategyid). - `customAmount.minimum` (number, required) Minimum custom amount. - `customAmount.multipleOf` (number, required) Multiple by which the custom amount increases. For example, if is equal to 5.30, and is 0.50, the valid custom amount is 5.30, 5.80, 6.30, 6.80 and so on until the value is reached. A valid custom amount must be equal to + X * , where X is any non negative integer. - `customAmount.maximum` (number, required) Maximum custom amount. This value must be equal to + X * , where X is any positive integer. - `priority` (integer) Non-negative integer value that specifies which deposit amount strategy is applied to the request. The deposit amount strategy with the highest priority value is applied. - `isActive` (boolean) Specifies if the deposit amount strategy is active. ## Response 201 fields (application/json): - `id` (string) ID of the deposit amount strategy. Example: "dep_str_0YVJ64MAHTDPA97H8S7R5MYR1M" - `name` (string, required) Name of the deposit amount strategy. - `filter` (string) Filter that uses deposit request properties to determine if a deposit amount strategy is applicable for the deposit request. If this field is empty, the deposit amount strategy is applicable for any request. Example: "depositRequest.currency:USD" - `amounts` (object, required) Amounts configuration for deposit amount strategy. - `amounts.calculator` (string, required) Deposit amounts calculator. This field specifies if amounts are calculated using an absolute or percentage calculation. Amounts are specified in , and increments are specified in . Example: and . - If the calculator is set to : the amounts displayed to the customer are . - If the calculator is set to : the amounts displayed to the customer are . Enum: "absolute", "percent" - `amounts.baseAmount` (number, required) First amount that is displayed to customer. - `amounts.increments` (array, required) List of incremental amounts that are displayed to customer. For more information, see the [ property](https://www.rebilly.com/catalog/all/deposits/postdepositstrategy#deposits/postdepositstrategy/t=request&path=amounts/calculator). - `amounts.adjustBaseToLastDeposit` (boolean) Specifies if the base amount must be adjusted based on the last deposit. If this value is , the is changed to the last successful deposit amount made using [Create a deposit request](https://www.rebilly.com/catalog/all/deposits/postdepositrequest). If the customer has no successful deposits, is not adjusted. - `customAmount` (object,null, required) Custom amount restrictions. If this value is , custom amounts are prohibited. If is not specified when a deposit request is created, amount restrictions are determined from the chosen deposit amount strategy. For more information, see the [ property](https://www.rebilly.com/catalog/all/deposits/postdepositrequest#deposits/postdepositrequest/t=request&path=strategyid). - `customAmount.minimum` (number, required) Minimum custom amount. - `customAmount.multipleOf` (number, required) Multiple by which the custom amount increases. For example, if is equal to 5.30, and is 0.50, the valid custom amount is 5.30, 5.80, 6.30, 6.80 and so on until the value is reached. A valid custom amount must be equal to + X * , where X is any non negative integer. - `customAmount.maximum` (number, required) Maximum custom amount. This value must be equal to + X * , where X is any positive integer. - `priority` (integer) Non-negative integer value that specifies which deposit amount strategy is applied to the request. The deposit amount strategy with the highest priority value is applied. - `isActive` (boolean) Specifies if the deposit amount strategy is active. - `createdTime` (string) Date and time which is set automatically when the resource is created. - `updatedTime` (string) Date and time which updates automatically when the resource is updated. - `_links` (array) Related links. - `_links.href` (string) Link URL. - `_links.rel` (string) Type of link. Enum: "self" ## Response 401 fields (application/json): - `status` (integer) HTTP status code. - `type` (string) Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank". - `title` (string) Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem. - `detail` (string) Human-readable explanation that is specific to this occurrence of the problem. - `instance` (string) URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. ## Response 403 fields (application/json): - `status` (integer) HTTP status code. - `type` (string) Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank". - `title` (string) Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem. - `detail` (string) Human-readable explanation that is specific to this occurrence of the problem. - `instance` (string) URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. ## Response 422 fields (application/json): - `status` (integer) HTTP status code. - `type` (string) Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank". - `title` (string) Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem. - `detail` (string) Human-readable explanation that is specific to this occurrence of the problem. - `instance` (string) URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. - `invalidFields` (array) Invalid field details. Example: [{"field":"field1","message":"field1 is invalid"},{"field":"subObject.field2","message":"field2 is invalid"},{"field":"subObject.field2","message":"another error in the field2"}] - `invalidFields.field` (string) Name of the field. Dot notation is used for nested object field names. - `invalidFields.message` (string) Message field. ## Response 429 fields (application/json): - `type` (string) Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank". Example: "about:blank" - `title` (string) Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem. Example: "Rate Limit Exceeded" - `status` (integer) HTTP status code. - `detail` (string) Human-readable explanation that is specific to this occurrence of the problem. Example: "A request cannot be executed because the user has sent too many requests within a certain period of time" - `instance` (string) URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.