Customer spending limit updated

This event occurs when a customer flex control changes.
Generated by: Update customer flex control
More information: Flexible transaction controls

Type: object
Domain: audit
Event: customer_spending_limit_updated
Version: 1

|
method required

Title: The HTTP Method of address register operation
Type: string
Example:
PATCH

uri required

Title: The URI of address register operation
Type: string
Example:
/v1/customers/{customerId}/spending-limits/{spendingLimitId}

email required

Title: The email of operator that registered address
Type: string
Example:
[email protected]

roles required

Type: array

origin required

Title: The request origin of address register operation
Type: string
Example:
P2P
PAYMENTS

object required

Title: The object that represents the account spending limit update
Type: object

id required

Title: The id of the spending control
Type: string
Example:
d68f8020-49ab-4c6d-a099-5ebe3867297d

org_id required

Title: The organization id of the customer spending limit
Type: string
Example:
d68f8020-49ab-4c6d-a099-5ebe3867297d

customer_id required

Title: The customer id of the customer spending limit
Type: integer
Example:
87613516

type

Title: Spending Limit type, can be usage_limit, spending_limit, restriction, or cumulative_limit
Type: string
Example:
usage_limit
spending_limit
restriction
cumulative_limit

processing_code

Title: A single processing code for the spending limit - DEPRECATED
Type: string
Example:
12345

processing_codes

Title: The processing codes list
Type: array
Example:

[
    "077707"
]
rule_reference_id

Title: The template rule ID
Type: string
Example:
d68f8020-49ab-4c6d-a099-5ebe3867297d

name

Title: The name of the customer spending limit
Type: string
Example:
spending limit name

account_id required

Title: The original account id
Type: integer
Example:
76376221

currency_code

Title: The currency code (ISO-4217) for the spending limit.
Type: string
Example:
BRL

max_limit

Title: The maximum spending limit
Type: integer
Example:
10000

max_amount

Title: The maximum amount. Either this field or max_transactions is required.
Description: The maximum cumulative amount that will be allowed. Either this field or max_transactions is required.
Type: integer
Example:
100000

max_transactions

Title: The maximum transactions. Either this field or max_amount is required.
Description: The maximum number of transactions that will be allowed. Either this field or max_amount is required.
Type: integer
Example:
10

available_limit

Title: The remaining spending limit
Type: integer
Example:
9900

limit_duration

Title: The limit period duration (ISO 8601 format) for the spending limit
Type: string
Example:
P1M

reset_datetime

Title: The reset datetime (RFC-3339 format) of the control
Type: string
Example:
2022-03-08T21:19:55Z00:00

card_ids

Title: The card ids list
Type: array
Example:

[
    "42069"
]
card_mode

Title: Specifies the operational mode of the card.
Description: Specifies the operational mode of the card.
Type: string
Must be one of the following:
credit
debit
Example:
credit

conditions

Type: array

attribute required

Title: The attribute to evaluate in the condition
Type: string
Example:
week_day

operator required

Title: Conditions operators
Type: string
Example:
nin

value required

Title: The value to compare
Type: string
Example:
monday,tuesday,wednesday,thursday,friday

reset_strategy

Title: The card rule accumulators reset strategy
Description: The defined strategy that will be considered to reset, increase or decrease the rule accumulators.
Type: object

reset_trigger required

Title: The trigger that should reset the card rule accumulators
Description: The trigger that should be considered to reset the control accumulators.
Type: object

is_password_present required

Title: The is_password_present flag
Description: The flag property that identifies if the transaction was contactless or not.
Type: string
Example:
false, true

active

Title: The active state of the customer spending limit
Type: boolean
Example:
true

deny_code

Title: The deny code related to the restriction
Type: string
Example:
ERR_VAL_WEEK_DAY

custom_code

Title: Custom code
Description: Alphanumeric three-character custom code. This can be the 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.
Type: string
Min length: 3
Max length: 3
Example:
A1B

response_code

Title: Alphanumeric two-character response code. This can be the standard card network response code or an alternative custom response code. When the platform denies a control evaluation, it returns the response code that provides the precise reason for the denial by the card network or anti-fraud solution.
Type: string
Example:
FM
57
05
A1

evaluation_order

Title: 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.
Type: integer
Example:
99

customized

Title: customized describes if the spending control is managed by the user
Type: boolean
Example:
true

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "title": "Customer spending limit updated",
    "description": "This event occurs when a customer flex control changes. <br> Generated by: <a href='https://developers.pismo.io/pismo-docs/reference/patch-v1-customers-flex-control-1' target='_blank'>Update customer flex control</a> <br> More information: <a href='https://developers.pismo.io/pismo-docs/docs/flex-controls' target='_blank'>Flexible transaction controls</a>",
    "required": [
        "method",
        "uri",
        "email",
        "roles",
        "origin",
        "object"
    ],
    "properties": {
        "method": {
            "type": "string",
            "title": "The HTTP Method of address register operation",
            "examples": [
                "PATCH"
            ]
        },
        "uri": {
            "type": "string",
            "title": "The URI of address register operation",
            "examples": [
                "/v1/customers/{customerId}/spending-limits/{spendingLimitId}"
            ]
        },
        "email": {
            "type": "string",
            "title": "The email of operator that registered address",
            "examples": [
                "[email protected]"
            ]
        },
        "roles": {
            "type": "array",
            "items": {
                "type": "string"
            },
            "title": "The roles of operator that registered address",
            "examples": [
                "test1",
                "test2"
            ]
        },
        "origin": {
            "type": "string",
            "title": "The request origin of address register operation",
            "examples": [
                "P2P",
                "PAYMENTS"
            ]
        },
        "object": {
            "type": "object",
            "title": "The object that represents the account spending limit update",
            "required": [
                "id",
                "org_id",
                "customer_id",
                "account_id"
            ],
            "properties": {
                "id": {
                    "title": "The id of the spending control",
                    "type": "string",
                    "examples": [
                        "d68f8020-49ab-4c6d-a099-5ebe3867297d"
                    ]
                },
                "org_id": {
                    "title": "The organization id of the customer spending limit",
                    "type": "string",
                    "examples": [
                        "d68f8020-49ab-4c6d-a099-5ebe3867297d"
                    ]
                },
                "customer_id": {
                    "title": "The customer id of the customer spending limit",
                    "type": "integer",
                    "examples": [
                        87613516
                    ]
                },
                "type": {
                    "title": "Spending Limit type, can be `usage_limit`, `spending_limit`, `restriction`, or `cumulative_limit`",
                    "type": "string",
                    "examples": [
                        "usage_limit",
                        "spending_limit",
                        "restriction",
                        "cumulative_limit"
                    ]
                },
                "processing_code": {
                    "title": "A single processing code for the spending limit - DEPRECATED",
                    "type": "string",
                    "examples": [
                        "12345"
                    ]
                },
                "processing_codes": {
                    "title": "The processing codes list",
                    "type": "array",
                    "items": {
                        "type": "string",
                        "title": "The processing code item",
                        "examples": [
                            "077707"
                        ]
                    }
                },
                "rule_reference_id": {
                    "title": "The template rule ID",
                    "type": "string",
                    "examples": [
                        "d68f8020-49ab-4c6d-a099-5ebe3867297d"
                    ]
                },
                "name": {
                    "title": "The name of the customer spending limit",
                    "type": "string",
                    "examples": [
                        "spending limit name"
                    ]
                },
                "account_id": {
                    "title": "The original account id",
                    "type": "integer",
                    "examples": [
                        76376221
                    ]
                },
                "currency_code": {
                    "title": "The currency code (ISO-4217) for the spending limit.",
                    "type": "string",
                    "examples": [
                        "BRL"
                    ]
                },
                "max_limit": {
                    "title": "The maximum spending limit",
                    "type": "integer",
                    "examples": [
                        10000
                    ]
                },
                "max_amount": {
                    "title": "The maximum amount. Either this field or `max_transactions` is required.",
                    "description": "The maximum cumulative amount that will be allowed. Either this field or `max_transactions` is required.",
                    "type": "integer",
                    "examples": [
                        100000
                    ]
                },
                "max_transactions": {
                    "title": "The maximum transactions. Either this field or max_amount is required.",
                    "description": "The maximum number of transactions that will be allowed. Either this field or max_amount is required.",
                    "type": "integer",
                    "examples": [
                        10
                    ]
                },
                "available_limit": {
                    "title": "The remaining spending limit",
                    "type": "integer",
                    "examples": [
                        9900
                    ]
                },
                "limit_duration": {
                    "title": "The limit period duration (ISO 8601 format) for the spending limit",
                    "type": "string",
                    "examples": [
                        "P1M"
                    ]
                },
                "reset_datetime": {
                    "title": "The reset datetime (RFC-3339 format) of the control",
                    "type": "string",
                    "examples": [
                        "2022-03-08T21:19:55Z00:00"
                    ]
                },
                "card_ids": {
                    "title": "The card ids list",
                    "type": "array",
                    "items": {
                        "type": "string",
                        "title": "The card id item",
                        "examples": [
                            "42069"
                        ]
                    }
                },
                "card_mode": {
                    "title": "Specifies the operational mode of the card.",
                    "description": "Specifies the operational mode of the card.",
                    "type": "string",
                    "enum": [
                        "credit",
                        "debit"
                    ],
                    "examples": [
                        "credit"
                    ]
                },
                "conditions": {
                    "title": "The customer spending limit conditions",
                    "type": "array",
                    "items": {
                        "type": "object",
                        "required": [
                            "attribute",
                            "operator",
                            "value"
                        ],
                        "properties": {
                            "attribute": {
                                "title": "The attribute to evaluate in the condition",
                                "type": "string",
                                "examples": [
                                    "week_day"
                                ]
                            },
                            "operator": {
                                "title": "Conditions operators",
                                "type": "string",
                                "examples": [
                                    "nin"
                                ]
                            },
                            "value": {
                                "title": "The value to compare",
                                "type": "string",
                                "examples": [
                                    "monday,tuesday,wednesday,thursday,friday"
                                ]
                            }
                        }
                    }
                },
                "reset_strategy": {
                    "title": "The card rule accumulators reset strategy",
                    "description": "The defined strategy that will be considered to reset, increase or decrease the rule accumulators.",
                    "type": "object",
                    "required": [
                        "reset_trigger"
                    ],
                    "properties": {
                        "reset_trigger": {
                            "title": "The trigger that should reset the card rule accumulators",
                            "description": "The trigger that should be considered to reset the control accumulators.",
                            "type": "object",
                            "required": [
                                "is_password_present"
                            ],
                            "properties": {
                                "is_password_present": {
                                    "title": "The is_password_present flag",
                                    "description": "The flag property that identifies if the transaction was contactless or not.",
                                    "type": "string",
                                    "examples": [
                                        "false, true"
                                    ]
                                }
                            }
                        }
                    }
                },
                "active": {
                    "title": "The active state of the customer spending limit",
                    "type": "boolean",
                    "examples": [
                        true
                    ]
                },
                "deny_code": {
                    "title": "The deny code related to the restriction",
                    "type": "string",
                    "examples": [
                        "ERR_VAL_WEEK_DAY"
                    ]
                },
                "custom_code": {
                    "title": "Custom code",
                    "description": "Alphanumeric three-character custom code. This can be the 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.",
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3,
                    "examples": [
                        "A1B"
                    ]
                },
                "response_code": {
                    "title": "Alphanumeric two-character response code. This can be the standard card network response code or an alternative custom response code. When the platform denies a control evaluation, it returns the response code that provides the precise reason for the denial by the card network or anti-fraud solution.",
                    "type": "string",
                    "examples": [
                        "FM",
                        "57",
                        "05",
                        "A1"
                    ]
                },
                "evaluation_order": {
                    "title": "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.",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 99,
                    "examples": [
                        99
                    ]
                },
                "customized": {
                    "title": "`customized` describes if the spending control is managed by the user",
                    "type": "boolean",
                    "examples": [
                        true
                    ]
                }
            }
        }
    }
}