Account flex controls
Create account flex control
Creates flex control for account. You use flex controls to restrict financial operations. For example, you can set spending and usage limits. For more information, refer to Flexible transaction controls.
To create a cumulative condition, set type as:
- 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
To create a restriction condition, set type as restriction.
This endpoint generates an Account flex control created event.
NOTE: This endpoint requires an account-specific access token.
post/v1/accounts/{accountId}/flex-controls
Request
- Base URLhttps://sandbox.pismolabs.io/rules
- URLhttps://sandbox.pismolabs.io/rules/v1/accounts/{accountId}/flex-controls
- AuthHTTP bearer
Path parameters
accountIdnumber required
Example:9999999
Account ID
Request body
Example request
{
"processing_codes": [
"07000",
"07001"
],
"name": "Purchase 1M limit",
"beneficiary_id": "8497225d-2096-4b92-990e-f73bd21bc48c",
"override_controls": [
"spending-limit-id-1",
"spending-limit-id-2"
],
"currency_code": "BRL",
"time_zone": "America/Sao_Paulo",
"max_limit": 1000,
"limit_duration": "P1M",
"reset_period": {
"week_day": "monday",
"time": "3:00AM",
"utc_time": "3:00AM"
},
"conditions": [
{
"id": "b4930a4d-e2c4-4fdc-9803-c83dec3a30d1",
"value": "10000"
}
],
"deny_code": "ERR_VAL_BALANCE",
"response_code": "57",
"custom_code": "A1B",
"active": true
}Response
OK. Successful flex control creation.
Example response
{
"id": "9cbdadc-860b-4275-a5cd-d9d892fd3869",
"deny_code": "ERR_VAL_BALANCE",
"name": "Purchase 1M limit",
"rule_reference_id": "purchase-1M",
"beneficiary_id": "8497225d-2096-4b92-990e-f73bd21bc48c",
"override_controls": [
"spending-limit-id-1",
"spending-limit-id-2"
],
"description": "This flex control restricts the max value to be spent every 24 hours",
"processing_codes": [
"07000",
"07001"
],
"currency_code": "BRL",
"time_zone": "America/Sao_Paulo",
"max_limit": 1000,
"available_limit": 300,
"conditions": [
{
"id": "b4930a4d-e2c4-4fdc-9803-c83dec3a30d1",
"value": "10000"
}
],
"limit_duration": "P1M",
"reset_period": {
"week_day": "monday",
"time": "3:00AM",
"utc_time": "3:00AM"
},
"reset_datetime": "2022-03-08T21:19:55Z",
"active": true,
"customized": true,
"response_code": "57",
"custom_code": "A1B"
}Changes
No recorded changes to this operation across all 1 revision of this API.