Customer flex controls
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.
post/v1/customers/{customerId}/flex-controls
Request
- Base URLhttps://sandbox.pismolabs.io/rules
- URLhttps://sandbox.pismolabs.io/rules/v1/customers/{customerId}/flex-controls
- AuthHTTP bearer
Path parameters
customerIdnumber required
Example:9999999
Customer ID
Request body
Example request
{
"processing_codes": [
"07000",
"07001"
],
"rule_reference_id": "purchase-1M",
"name": "Purchase 1M limit",
"account_id": 500000,
"currency_code": "BRL",
"max_limit": 1000,
"max_transactions": 10,
"max_amount": 100000,
"limit_duration": "P1M",
"time_zone": "America/Sao_Paulo",
"reset_period": {
"week_day": "monday",
"time": "3:00AM",
"utc_time": "3:00AM"
},
"reset_strategy": {
"reset_trigger": {
"authentication_method": [
"05"
]
}
},
"conditions": [
{
"id": "b4930a4d-e2c4-4fdc-9803-c83dec3a30d1",
"value": "10000"
}
],
"active": true,
"deny_code": "ERR_VAL_BALANCE",
"response_code": "57",
"custom_code": "A1B",
"card_mode": "credit"
}Response
OK. Successful flex control creation.
Example response
{
"id": "89cbdadc-860b-4275-a5cd-d9d892fd3869",
"processing_codes": [
"07000",
"07001"
],
"rule_reference_id": "purchase-1M",
"name": "Purchase 1M limit",
"account_id": 8988000,
"customer_id": 99999999,
"card_ids": [
11111,
22222
],
"currency_code": "BRL",
"max_limit": 1000,
"max_transactions": 10,
"max_amount": 100000,
"available_amount": 100000,
"available_transactions": 10,
"limit_duration": "P1M",
"reset_datetime": "2022-03-08T21:19:55Z",
"time_zone": "America/Sao_Paulo",
"reset_period": {
"week_day": "monday",
"time": "3:00AM",
"utc_time": "3:00AM"
},
"reset_strategy": {
"reset_trigger": {
"authentication_method": [
"05"
]
}
},
"available_limit": 300,
"conditions": [
{
"attribute": "balance",
"operator": "gt",
"value": "10000"
}
],
"active": true,
"deny_code": "ERR_VAL_BALANCE",
"response_code": "57",
"custom_code": "A1B",
"card_mode": "credit",
"customized": true
}Changes
No recorded changes to this operation across all 1 revision of this API.