Create customer flex control

Creates flex control for customer. You use flex controls to restrict financial operations. For example, you can set spending and usage limits. See Flexible transaction controls for more information.

To create a cumulative condition, set type to:

  • usage_limit: Cumulative flex control that increases by one until max_limit
  • spending_limit: Cumulative flex control that increases by the current transaction's amount until max_limit
  • cumulative_limit: Cumulative flex control that increases by one transaction or by transaction amount until a condition is met, applies only to flex controls with associated card_ids, and requires a reset_strategy

To create a restriction condition, set type as restriction.

Once you create the control, you can't change its type.

This endpoint generates a Customer flex control created event.

NOTE: This endpoint requires an account-specific access token.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
number
required

Customer ID

Body Params

Create customer flex control request. You use flex controls to restrict financial operations. For example, you can set spending and usage limits. See Flexible transaction controls for more information.

string
enum
required

Flex control scope

  • usage_limit: Cumulative flex control that increases by one until max_limit
  • spending_limit: Cumulative flex control that increases by the current transaction's amount until max_limit
  • cumulative_limit: Cumulative flex control that increases by one transaction or by transaction amount until a condition is met, applies only to flex controls with associated card_ids, and requires a reset_strategy
  • restriction: Restriction flex control that only validates specified conditions
Allowed:
processing_codes
array of strings

Processing codes list for evaluating flex control conditions. If the value is empty, the flex control applies to any processing code.

processing_codes
string

If rule_reference_id is set, this program-level flex control, if it exists, overrides this flex control.

string
required

Flex control name

int64
required

Account ID

string

Flex control currency code (ISO 4217). Defines the precision used for monetary values such as max_limit, available_limit, and condition.value.

int64
≥ 1

Defines the maximum limit for the control. Its meaning depends on the flex control type.

  • For spending_limit controls, max_limit represents the maximum spending amount allowed.
  • For usage_limit controls, max_limit represents the maximum number of transactions allowed.

Once met or exceeded, any subsequent transactions are declined by evaluation control flow.

For spending limits, note that this value is an integer. Since global currencies vary in the number of digits that are allowed after the decimal point, you must convert the actual maximum spending limit into an integer value to use in this field. To do this, use the following formula.

value = floatNumber × 10^X, where X is the number of digits after the decimal separator for the currency as defined in ISO 4217.

For example, if you want to set the value 499.99 for BRL currency transactions, where the number of decimal places is 2, you must set it to 49999 (499.99 × 10²).

If you want to set the value 499 for JPY currency transactions, where the number of decimal places is 0, you must set it to 4999 (4999.0 × 10^0 = 4999.0 × 1 - in other words, the value doesn't change.)

This field is REQUIRED for flex controls with the type of spending_limit and usage_limit, and it does not apply to flex controls with the type of restriction and cumulative_limit.

int64
≥ 1

Maximum number of transactions allowed. Once met or exceeded, subsequent transactions are declined by the evaluation control flow. Valid only for flex controls with the type of cumulative_limit.

int64
≥ 1

Maximum accumulated amount allowed. Once met or exceeded, subsequent transactions are declined by the evaluation control flow. Valid only for flex controls with the type of cumulative_limit. Note that the value must be calculated as follows.

value = floatNumber × 10^X, where X is the number of digits after the decimal separator for the currency defined in ISO 4217.

For example, if you want to set the value 499.99 for USD currency transactions, where the number of decimal places is 2, you must set the value to 49999 (499.99 × 10²).

If you want to set the value 499 for JPY currency transactions, where the number of decimal places is 0, you must set the value to 499 (499.0 × 10^0 = 499.0 × 1 - in other words, the value doesn't change).

string

Flex control limit period duration (ISO 8601 format). For example, if a flex control sets a spending limit of $500, and limit_duration is set to one month (P1M), then the user cannot spend more than $500 from the account in any one month period.

string

IANA Time Zone database, such as "America/New_York". This attribute is used to evaluate the flex control using the desired time zone for condition attributes such as week_day, month_day, time_now, and reset_period. If time_zone is empty, the control is evaluated using the UTC time zone.

reset_period
object

Enables the specification of reset periods for accumulators based on the duration in limit_duration. When this field is set, it must follow the RFC 3339 pattern from ISO 8601. When reset_period changes, the avaliable_limit is reset.

reset_strategy
object

The strategy to reset the accumulators. Valid only for flex controls with the type of cumulative_limit.

card_ids
array of int64s

List of card IDs

card_ids
conditions
array of objects
conditions
boolean
Defaults to true

If not specified, defaults to 'true'. If set to 'false', the flex control is skipped during evaluation.

string

Deny code related to restriction. This code is returned when the evaluation does not meet the conditions.

string
length between 2 and 2

Alphanumeric two-character response code. This can be the standard card network response code. When the platform denies a transaction, it returns the response code that provides the precise reason for the denial by the card network.

string
length between 1 and 3

Alphanumeric three-character custom code. This can be an alternative custom code. When the platform denies a control evaluation, it returns the custom code that provides the precise reason for the denial by the anti-fraud solution.

int64
1 to 99

Order in which the control is evaluated. If this value is not provided, the control is evaluated after the controls with the configured evaluation_order value.

string
enum

Specifies the operational mode of the card.

Allowed:
Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json