---
title: "Custom Attributes"
slug: "custom-attributes"
updated: 2025-07-24T07:31:17Z
published: 2025-07-24T07:31:17Z
canonical: "docs.monri.com/custom-attributes"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monri.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Attributes

Provide `custom_attributes` value if you want to customize form behaviour. This value (if provided) must be valid json.

Currently we support following keys:

* `installments_config`
* `fields_config`

Example:

```json
{
  "installments_config": {
    "rules": [
      {
        "brand": "visa",
        "min_installments": 2,
        "max_installments": 12
      },
      {
        "brand": "master",
        "min_installments": 12,
        "max_installments": 24
      }
    ]
  },
  "fields_config": {
    "fields": [
      {
        "name": "ch_email",
        "readonly": true
      },
      {
        "name": "ch_full_name",
        "readonly": true
      }
    ]
  }
}
```

## Installments Config

Used to customize installments selection after user's card number input.

This extension can be used to fulfil contract between merchant and buyer, where buyer can only pay with one of supported card brands (provided in rules list) by selecting installments from min\_installments to max\_installments defined in installments config.

Types:

* `InstallmentConfig`
  * type = object
  * properties
    * rules
      * type = `Array<InstallmentsConfigRule>`
      * description = includes one or more installments config rule. Rule's brand must be unique per `rules` array. This means you cannot include multiple brand = 'brand' rules.
* `InstallmentsConfigRule`
  * type = object
  * properties
    * brand
      * type = string
      * description = one of `visa`,`master`,`maestro`, `diners`, `amex`
    * min\_installments
      * type = number, integer
      * description = min installments, must be < than max\_installments
    * max\_installments
      * type = number, integer
      * description = max installments, must be > than min\_installments

Installments config example:

```json
{
  "installments_config": {
    "rules": [
      {
        "brand": "visa",
        "min_installments": 2,
        "max_installments": 12
      },
      {
        "brand": "master",
        "min_installments": 12,
        "max_installments": 24
      }
    ]
  }
}
```

***

_**Usage example**_

**Requirements**

* installments are enabled in merchant's profile
* merchant's acquiring account is enabled for installments

If you need helping enabling installments contact support@monri.com

***

**Example steps**

* Set custom attributes field to

```JSON
'{
    "installments_config": {
        "rules": [{
                "brand": "visa",
                "min_installments": 2,
                "max_installments": 12
            }, {
                "brand": "master",
                "min_installments": 12,
                "max_installments": 24
            }
        ]
    }
}'
```

* Submit prepared data
* Enter `visa` or `master` card number in `card number` field
  * Installments selection is updated using rules provided in installments config. If `visa` is entered installments selection is `one time payment (jednokratno)` and then from `2 to 12` installments. If `master` is entered installments selection is `one time payment (jednokratno)` and then from `12 to 24` installments
  * Select desired number of installments
  * Proceed with payment
  * Payment completed
* Enter `amex (eg 3704 387472 13977)` in `card number` field
  * installments selection is only `one time payment - jednokratno`
  * appropriate error message is shown - `Card 'amex' not supported`
  * payment is disabled

## Fields Config

Used to customize installments selection after user's card number input.

This extension can be used to fulfil contract between merchant and buyer, where buyer can only pay with one of supported card brands (provided in rules list) by selecting installments from min\_installments to max\_installments defined in installments config.

Types:

* `FieldsConfig`
  * type = object
  * properties
    * fields
      * type = `Array<FieldConfig>`
      * description = includes one or more field configs
* `FieldConfig`
  * type = object
  * properties
    * name
      * type = string
      * description = one of `ch_email`,`ch_full_name`
    * readonly
      * type = boolean
      * description = `true` or `false`. Field is readonly for input only if initial value is provided and valid

Fields config example:

```JSON
{
   "fields_config":{
      "fields":[
         {
            "name":"ch_email",
            "readonly": true
         },
         {
            "name":"ch_full_name",
            "readonly": true
         }
      ]
   }
}
```

***

_**Usage example**_

**Example steps**

* Set custom attributes field to

```JSON
'{
    "fields_config": {
        "fields": [{
                "name": "ch_email",
                "readonly": true
            }, {
                "name": "ch_full_name",
                "readonly": true
            }
        ]
    }
}'
```

* Submit prepared data
* Inputs for email and full name (if provided) are read-only

***
