Form description

Title fields on the form

The description of the payment form is a JSON document in UTF-8 encoding.

Example of the first step of the bill payment form
{
  "title": "Bill",
  "form": [
    {
      "type": "text",
      "name": "Supplier INN",
      "hint": "10 digits (12 digits for sole proprietors)",
      "label": "Recipient's INN",
      "alert": "Please specify the recipient's INN",
      "required": true,
      "readonly": false,
      "minlength": 10,
      "maxlength": 12,
      "pattern": "^\\d{10}$|^\\d{12}$"
    },
    {
      "type": "submit",
      "label": "Continue"
    }
  ],
  "money_source": [
    "wallet",
    "cards",
    "payment-card",
    "cash"
  ],
  "hidden_fields": {
    "ShopID": "13423",
    "ShopArticleID": "35241",
    "ShowCaseID": "3005",
    "ContractTemplateID": "524867",
    "budgetDocNumber": "0",
    "has_external_status": "",
    "is_withdrawal": ""
  }
}
Example of adding credit to a Skype account
{
  "title": "Skype",
  "form": [
    {
      "type": "text",
      "name": "FormComment",
      "value": "Skype",
      "label": "Name",
      "required": false,
      "readonly": false
    },
    {
      "type": "text",
      "name": "skypename",
      "label": "Логин в Skype",
      "required": true,
      "readonly": false
    },
    {
      "type": "amount",
      "name": "netSum",
      "value": "0.00",
      "label": "Amount",
      "required": true,
      "readonly": false,
      "max": 375,
      "currency": "EUR"
    },
    {
      "type": "submit",
      "label": "Pay"
    }
  ],
  "money_source": [
    "wallet",
    "cards",
    "payment-card",
    "cash"
  ],
  "hidden_fields": {
    "ContractTemplateID": "525923",
    "ShopID": "14061",
    "ShopArticleID": "71747",
    "ShowCaseID": "6101"
  }
}
The title section

The name of the product being purchased.

Field type: string.

Example
"title": "RusTel Northwest"
The hidden_fields section

Service fields for the form.

Field type: object, a key-value set.

The client should transparently transmit the set of fields when the form data is sent to the server.

Example
"hidden_fields": {
    "targetcurrency": "643",
    "ShopArticleID": "35241"
}
The money_source section
List of available payment methods. Field type: array.
Payment method Description
wallet Payment from a Yandex.Money wallet.
cards Payment using bank cards that are linked to the account.
payment-card Payment using a bank card.
cash Payment in cash.
Example
"money_source": [
  "wallet",
  "cards",
  "payment-card",
  "cash"
]
The form section

The description of the form that should be shown to the buyer.

The form element is the root container for the form. It contains a list (group) of UI controls and containers.

The client should render the elements inside form vertically, top to bottom.

Example
"form": [   ... UI controls and containers ...
]

UI controls

A UI control is a field on the form designed for the user to enter something.

By default, all the control values must be filled in by the buyer, unless a form is explicitly declared to be optional (required=false).

The type of field data and rules for checking the values on the client side are determined by the control's type and attributes.

All the control attributes listed below always exist in a description, unless explicitly specified otherwise.

General attributes of controls
Attribute Type Description
type string Type of UI control. Required attribute.
name string Name of the form field, or parameter name for the form data submission request. Required attribute.
value string Pre-set value of a control (other than checkbox). Optional attribute. Omitted by default.
value_autofill string Autofill macro for pre-setting field values by the client. Optional attribute. Omitted by default. If the client handles macros, their values determine the "value" attribute.
hint string Hint for the buyer about the purpose and format of data in the field. Optional attribute. Omitted by default.
label string Title of the field to display to the buyer as a label on the control. Optional field. Omitted by default.
alert string

Error text to show to the buyer when there is an error verifying the information entered in this field. Optional field. Omitted by default.

The text is for displaying when there is an error checking data on the client side.

required boolean Indicates whether the field must be filled in by the buyer. By default, true.
readonly boolean Indicates whether the field value can be changed. By default, false.
text — Text box

Single line for entering text.

http://www.w3.org/TR/html5/forms.html#text-(type=text)-state-and-search-state-(type=search)

Control-specific attributes:

Attribute Data type Description
type string Constant value: text.
minlength int Minimum allowed length of the string. Optional parameter, no default.
maxlength int Maximum allowed length of the string. Optional parameter, not restricted by default.
pattern string

Regular expression for checking values entered by the buyer.

Regular expression format: ECMA-262 RegExp (JavaScript RegExp).

Optional parameter. Omitted by default.

keyboard_suggest enum

Recommended type of on-screen keyboard for mobile devices.

Possible values:
  • number — Display a digital keyboard for the field.

By default, the attribute is not defined, and a text keyboard is displayed.

Example
{
  "type": "text",
  "name": "surname",
  "label": "Last Name",
  "required": true,
  "readonly": false
}
Example for a field with a set of decimal digits
{
  "type": "text",
  "name": "kbk",
  "label": "KBK",
  "pattern": "[0-9]{20}",
  "required": true,
  "readonly": false,
  "keyboard_suggest": "number"
}
number — Number entry field

Example for a field with a set of decimal digits

http://www.w3.org/TR/html5/forms.html#number-state-(type=number)

Control-specific attributes:

Attribute Data type Description
type string Constant value: number.
min decimal number Minimum value. Optional attribute, no default (no minimum).
max decimal number Maximum value. Optional attribute, no default (no minimum).
step decimal number

Minimum number gradation ("step scale factor"). Optional attribute. Default value is 1.

Examples of possible values:
  • 1 — Allows only integers.
  • 0.01 — Minimum allowed step of a decimal number.
  • 10 — Allows only integers that are multiples of 10.
Example
{
  "type": "number",
  "name": "qty",
  "label": "Amount, units",
  "step": 1,
  "required": true,
  "readonly": false
}
Example
{
  "type": "number",
  "name": "coins",
  "label": "Amount in game currency",
  "step": 0.01,
  "required": true,
  "readonly": false
}
amount — Box for entering amount

Single-line amount input field that extends the number type.

Control-specific attributes:

Attribute Data type Description
type string Constant value: amount.
min decimal number Minimum value. By default, 0.01.
max decimal number Maximum value. Optional attribute, no default (no minimum).
step decimal number Multiplication factor of the amount. By default, 0.01.
currency string, \[A-Z\]{3}

Three-letter currency code conforming to the ISO-4217 standard.

By default, RUB.

fee object

Information about the commission charged to the buyer.

If this section is included, it means that the buyer is charged a fee.

By default, there is no fee charged to the buyer.

Attributes of the fee section:

Attribute Data type Description
type enum
Type of fee charged to the buyer. Can have the values:
  • std — The fee is based on a standard formula.
  • custom — The fee has a complex formula or is calculated by the merchant. The fee will be calculated during payment. You must inform the buyer that there is a fee.

By default, std.

a decimal number A coefficient of the amount to transfer to the merchant (netAmount). By default, 0.
b decimal number A fixed fee per transaction, in currency units. By default, 0.
c decimal number The minimum fee per transaction, in currency units. By default, 0.
d decimal number The maximum fee per transaction, in currency units. By default, 0.
amount_type enum

The type of amount on the payment form. Possible values:

  • amount — The amount to deduct from the buyer's account.
  • netAmount — The amount to transfer to the merchant (to be received).

By default, amount.

Example: 2% commission over the amount to transfer to the merchant
{
  "type": "amount",
  "name": "sum",
  "label": "Amount",
  "min": 0.01,
  "step": 0.01,
  "currency": "RUB",
  "fee": {
    "a": 0.02,
    "amount_type": "netAmount"
  },
  "required": true,
  "readonly": false
}
Example: A commission is calculated on the partner side during payment
{
  "type": "amount",
  "name": "sum",
  "label": "Amount",
  "min": 0.01,
  "step": 0.01,
  "currency": "RUB",
  "fee": {
    "type": "custom"
  },
  "required": true,
  "readonly": false
}
Information about commissions

The payment form can have a commission fee set to charge the buyer.

The fee is defined by the formula:

amount = netAmount + fee
Where:
  • amount — The amount to deduct from the buyer's account.
  • netAmount — The amount to transfer to the merchant (to be received).
  • fee — The size of the fee charged to the buyer.
Standard formula for calculating the commission fee
fee = min(max(a * netAmount + b, c), d)
Calculating "amount" from "netAmount"
amount = netAmount + min(max(a * netAmount + b, c), d)
Calculating "netAmount" from "amount"
netAmount = amount - min(max(max(amount * (a / (1 + a)) + b / (1 + a), b), c), d)
Minimum commission fee rule

If there is a commission fee charged to the user, regardless of the rates in the formula, the commission must not be less than 0.01 of the currency unit for the account (1 kopek).

If calculating the fee results in an amount less than 0.01, it is always rounded up to 0.01.

Minimum amount rule

When calculating netAmount from amount, you can only specify an amount for which netAmount will be greater than or equal to 0.01 units of the account currency (1 kopek).

If a smaller amount is specified, this leads to an error — the payment is not possible.

Standard types of commissions:

Type Coefficients
Without commission a=0, b=0, c=0, d=<undefined>. The fee block is omitted.
Percent of amount a=<coefficient>, b=0, c=0, d=<undefined>.
Fixed commission fee per transaction a=0, b=<amount, RUB>, с=0, d=<undefined>.
Percent of amount AND fixed commission fee per transaction a=<coefficient>, b=<amount>, c=0, d=<undefined>.
Percent of amount OR minimum commission fee per transaction a=<coefficient>, b=0, c=<amount>, d=<undefined>.
email — Email input field

Box for entering an email address.

http://www.w3.org/TR/html5/forms.html#e-mail-state-(type=email)

Control-specific attributes:

Attribute Data type Description
type string Constant value: email.
Example
{
  "type": "email",
  "name": "email",
  "label": "Email",
  "required": true,
  "readonly": false
}
tel — Phone number input field

Box for entering a phone number.

http://www.w3.org/TR/html5/forms.html#telephone-state-(type=tel)

The format of the phone number value sent to the server is ITU-T T.164, the complete phone number without a + sign. For example, 79999999999.

The client can display the control as necessary, and choose the format for user input.

Control-specific attributes:

Attribute Data type Description
type string Constant value: tel.
Example
{
  "type": "tel",
  "name": "phone",
  "value": "79210000000",
  "hint": "International format",
  "label": "Phone number",
  "alert": "The phone number can only contain numbers",
  "required": true,
  "readonly": false
}
checkbox — Checkbox option

A checkbox is a control that implements a true/false flag.

http://www.w3.org/TR/html5/forms.html#checkbox-state-(type=checkbox)

The behavior of the control is defined in the HTML5 specification:
  • The value attribute defines the value that will be sent to the server if the option is selected. It can have any string value.
  • The state of the control is defined by the checked attribute — whether the option is selected or deselected.
  • Only those fields that have the option selected (checked=true) are sent to the server.

Control-specific attributes:

Attribute Data type Description
type string Constant value: checkbox.
value string The value that will be sent to the server if the flag is set.
checked boolean
Starting state of the control:
  • true — Flag is set (checked).
  • false — Flag is cleared (unchecked).

Optional attribute. By default, false.

required boolean
  • true - The form can be sent to the server only if the user selected the option.
  • false - The form can be sent to the server regardless of the state of the option (selected or unselected).
Example
{
  "type": "checkbox",
  "name": "notify_me",
  "value": "agreed",
  "checked" : true,
  "label": "Notify me of deposits",
  "readonly": false,
  "required": false
}
date — Date selection (day/month/year)

A calendar for selecting the full date.

http://www.w3.org/TR/html5/forms.html#date-state-(type=date)

Control-specific attributes:

Attribute Data type Description
type string Constant value: date.
min date string or period Minimum date allowed. Optional attribute. By default, any date.
max date string or period Maximum date allowed. Optional attribute. By default, any date.

When sending form data to the server, the field value must be in date string format, such as "2015-02-12".

Example
{
  "type": "date",
  "name": "receipt_date",
  "label": "Resolution date",
  "required": true,
  "readonly": false
}
month — Selection of month and year

A calendar for selecting only the month and year

http://www.w3.org/TR/2012/CR-html5-20121217/forms.html#month-state-(type=month)

Control-specific attributes:

Attribute Data type Description
type string Constant value: month.
min month string or period Minimum allowed month and year. Optional attribute. By default, any date.
max month string or period Maximum allowed month and year. Optional attribute. By default, any date.

When sending form data to the server, the field value must be in month string format, such as "2015-02".

Example
{
  "type": "month",
  "name": "period",
  "label": "Payment period",
  "required": true,
  "readonly": false
}
select — Selection of list item

A control for selecting one of the values from a list. Only represents the data model. The visual display of the control is up to the client's discretion (ComboBox, Select, RadioGroup, Spinner, and so on).

http://www.w3.org/TR/html5/forms.html#the-select-element

The control can change the visual state of the form by switching the form viewstates.

Control-specific attributes:

Attribute Data type Description
type string Constant value: select.
value string

The selected default value. Optional field.

If this attribute is omitted or set to a null value, it means "nothing was selected".

options array of object List of values to select from.
style enum

Control display recommended to the client.

Optional attribute. By default, the client decides how to display this control.

Possible values:

  • RadioGroup — RadioButton/RadioGroup.
  • Spinner — Drop-down menus (ComboBox, DropDownList, Select).

Attributes of list items:

Attribute Data type Description
value string

The selected value that will be sent to the server as the value for this form field.

Required attribute. Its value must not be empty.

label string The text shown to the buyer in the list of values.
group array of object

A list (group) of UI controls and/or containers that become visible if this value is selected.

May contain other nested select parameters.

Optional attribute. By default, not defined (the form's visual state does not change).

Example
{
  "type": "select",
  "name": "country",
  "value": "gb",
  "label": "Country for calls",
  "options": [
    {
      "value": "gb",
      "label": "Great Britain"
    },
    {
      "value": "de",
      "label": "Germany"
    },
    {
      "value": "es",
      "label": "Spain"
    },
    {
      "value": "it",
      "label": "Italy"
    }
  ],
  "required": true,
  "readonly": false
}
Example: Selection changes the form's visible state
{
  "type": "select",
  "name": "DeliveryType",
  "value": "ym_msk",
  "label": "Where to get the reader",
  "options": [
    {
      "value": "ym_msk",
      "label": "at the Yandex.Money office in Moscow"
    },
    {
      "value": "russianPost",
      "label": "at a Russian Post branch office (after delivery)",
      "group": [
          // a group of UI controls and/or containers that    becomes active if 
          // this value is selected (a list of fields for entering     the mailing address) 
      ]
    }
  ],
  "required": true,
  "readonly": false
}
textarea — Multi-line text box

A field for entering any text, which may consist of multiple lines.

http://www.w3.org/TR/html5/forms.html#the-textarea-element

Control-specific attributes:

Attribute Data type Description
type string Constant value: textarea.
maxlength int Maximum allowed length of text, in characters. Optional attribute, not restricted by default.
minlength int Minimum allowed length of text, in characters. Optional attribute, not defined by default.
Example
{  "type": "textarea",  "name": "comment",  "label": "Comments on the transfer",  "hint": "You can enter a message for the recipient here",  "maxlength": 150,  "required": false,  "readonly": false}
submit — Form submission button

Button on the form that initiates sending it to the server.

http://www.w3.org/TR/html5/forms.html#submit-button-state-(type=submit)

Control-specific attributes:

Attribute Data type Description
type string Constant value: submit.
Example
{
  "type": "submit",
  "label": "Pay",
  "required": true,
  "readonly": false
}

{ "type": "group", "label": "Transfer recipient", "layout": "VBox", "items": [ { "type": "text", "name": "surname", "label": "Last name", "required": true, "readonly": false, "maxlength": 50, "alert": "Please enter the recipient's last name" }, { "type": "text", "name": "name", "label": "Name", "required": true, "readonly": false, "maxlength": 50, "alert": "Please enter the recipient's first name" }, { "type": "text", "name": "patronymic", "label": "Patronymic", "required": true, "readonly": false, "maxlength": 50, "alert": "Please enter the recipient's patronymic" } ]}

A container is a group of UI controls or static data to display to the buyer.

General attributes of containers
Attribute Type Description
type string Type of container. Required attribute.
group — Group of controls or containers

A group containing a list of UI controls and/or nested containers

All attributes are required, unless explicitly specified otherwise.

Container-specific attributes:

Attribute Data type Description
type string Constant value: group.
items array List of controls and/or nested containers.
label string Group title (label on the group). Optional attribute. Omitted by default.
layout enum

Recommended layout of items inside the group.

Possible values:

  • VBox — Vertically, top to bottom.
  • HBox — Horizontally, left to right.

Optional attribute. By default: VBox.

Example
{
  "type": "group",
  "label": "Transfer recipient",
  "layout": "VBox",
  "items": [
    {
      "type": "text",
      "name": "surname",
      "label": "Last name",
      "required": true,
      "readonly": false,
      "maxlength": 50,
      "alert": "Please enter the recipient's last name"
    },
    {
      "type": "text",
      "name": "name",
      "label": "Name",
      "required": true,
      "readonly": false,
      "maxlength": 50,
      "alert": "Please enter the recipient's first name"
    },
    {
      "type": "text",
      "name": "patronymic",
      "label": "Patronymic",
      "required": true,
      "readonly": false,
      "maxlength": 50,
      "alert": "Please enter the recipient's patronymic"
    }
  ]
}
p — Text paragraph

A section of static text that may contain hyperlinks.

http://www.w3.org/TR/html5/dom.html#paragraphs

Container-specific attributes:

Attribute Data type Description
type string Constant value: p.
items Array List of paragraph elements.
label string Paragraph title (label over the text section). Optional attribute.

Paragraph elements can be:

  • text string (string type)
  • hyperlinks (object type)

Hyperlink attributes:

Attribute Data type Description
type string Constant value: a.
href URL HTTP(S) hyperlink.
label string Hyperlink text displayed to the buyer.
Example
{
  "type": "p",
  "items": [
    "By clicking \"Pay\", you accept",
    {
      "type": "a",
      "href": "http://money.yandex.ru/doc/12345567890",
      "label": "the terms of purchase of"
    },
    "an iTunes PIN code."
  ]}

ViewState — Changeable form states

You can change the set of visible form elements, depending on the values selected for specific controls with the select type.

Rules for working with forms with changeable states:

  • A form can be either single-step, or a step in a multistep form.
  • The description of a form or step of a form contains a complete list of UI controls and containers.
  • Each UI control or container has a visibility state: whether it is displayed on the form, or not.
  • ViewState (the form state) is a list of controls or containers displayed on the form in the current state.
  • One of the UI controls on the form switches the states.

The state switch logic works like the switch-case operator in popular programming languages:

select {
  option X =>
     elements visible in state X
  option Y =>
     elements visible in state Y
  option Z =>
     ....
}

The UI controls and containers that are located inside a particular select option become visible only when the value for this option is selected.

When submitting form data to the server, only the values of the UI controls that are visible in this state are added to the request.

Example: Payment form for purchasing an mPOS reader
{
  "title": "Reader for mobile point of sale (mPOS)",
  "hidden_fields": {
    "rnd": "77122820",
    "scid": "6953",
    "shn": "Reader for mobile point of sale (mPOS)",
    "targetcurrency": "643",
    "Successstemplate": "ym2xmlsuccess",
    "ErrorTemplate": "ym2xmlerror",
    "ShowCaseID": "7",
    "isViaWeb": "true",
    "try-payment": "true",
    "FormComment": "Reader for mobile point of sale (mPOS)"
  },
  "form": [
    {
      "type": "text",
      "name": "Ewallet",
      "label": "account Number",
      "hint": "money will be credited to this account",
      "value_aurofill": "currentuser_accountkey",
      "pattern": "[0-9]{11,33}",
      "required": true,
      "readonly": false
    },
    {
      "type": "tel",
      "name": "contactPhoneNumber",
      "label": "phone Number",
      "required": true,
      "readonly": false
    },
    {
      "type": "text",
      "name": "LastName",
      "label": "last Name",
      "maxlength": 150,
      "required": true,
      "readonly": false
    },
    {
      "type": "text",
      "name": "FirstName",
      "label": "Name",
      "maxlength": 150,
      "required": true,
      "readonly": false
    },
    {
      "type": "text",
      "name": "MiddleName",
      "label": "middle Name",
      "maxlength": 150,
      "required": true,
      "readonly": false
    },
    {
      "type": "select",
      "name": "DeliveryType",
      "value": "ym_msk",
      "label": "Where to get the reader",
      "options": [
        {
          "value": "ym_msk",
          "label": "at Yandex office.Money in Moscow"
        },
        {
          "value": "ym_spb",
          "label": "at Yandex office.Money in St. Petersburg"
        },
        {
          "value": "russianPost",
          "label": "in the Russian Post office (after delivery)",
          "group": [
            {
              "type": "select",
              "name": "country",
              "value": "Russia",
              "label": "Country",
              "options": [
                {
                  "value": "Russia",
                  "label": "Russia"
                },
                {
                  "value": "Belarus",
                  "label": "Belarus"
                },
                {
                  "value": "Ukraine",
                  "label": "Ukraine"
                },
                {
                  "value": "Moldova",
                  "label": "Moldova"
                },
                {
                  "value": "Armenia",
                  "label": "Armenia"
                },
                {
                  "value": "Azerbaijan",
                  "label": "Azerbaijan"
                },
                {
                  "value": "Kyrgyzstan",
                  "label": "Kyrgyzstan"
                },
                {
                  "value": "Kazakhstan",
                  "label": "Kazakhstan"
                },
                {
                  "value": "Tajikistan",
                  "label": "Tajikistan"
                },
                {
                  "value": "Turkmenistan",
                  "label": "Turkmenistan"
                },
                {
                  "value": "Uzbekistan",
                  "label": "Uzbekistan"
                }
              ]
            },
            {
              "type": "text",
              "name": "index_address",
              "label": "Index",
              "pattern": "[0-9]{6,8}",
              "required": true,
              "readonly": false
            },
            {
              "type": "text",
              "name": "deliveryRegion",
              "label": "Region",
              "maxlength": 44,
              "required": true,
              "readonly": false
            },
            {
              "type": "text",
              "name": "address_1",
              "label": "Locality",
              "maxlength": 150,
              "required": true,
              "readonly": false
            },
            {
              "type": "text",
              "name": "deliveryStreet",
              "label": "Street",
              "maxlength": 44,
              "required": true,
              "readonly": false
            },
            {
              "type": "text",
              "name": "deliveryHouse",
              "label": "house number",
              "maxlength": 9,
              "required": true,
              "readonly": false
            },
            {
              "type": "text",
              "name": "deliveryCorpus",
              "label": "building unit",
              "maxlength": 9,
              "required": true,
              "readonly": false
            },
            {
              "type": "text",
              "name": "deliveryBuilding",
              "label": "page",
              "maxlength": 9,
              "required": true,
              "readonly": false
            },
            {
              "type": "text",
              "name": "deliveryFlat",
              "label": "apartment",
              "maxlength": 9,
              "required": true,
              "readonly": false
            }
          ],
          "required": true,
          "readonly": false
        }
      ]
    },
    {
      "type": "p",
      "items": [
        "By clicking this button, I accept",
        {
          "type": "a",
          "href": "http://money.yandex.ru/doc.xml?id=526489",
          "label": "terms of use of the mobile terminal"
        },
        "."
      ]
    },
    {
      "type": "submit",
      "label": "Continue",
      "required": true,
      "readonly": false
    }
  ]
}

Autofill macros

Autofill macros are for pre-filling form fields with specific values on the client side.

If the client processes macros, it generates value, which overrides value on the form.

If the client does not process macros, it is ignored.

Example
{      "type": "text",      "name": "Ewallet",      "label": "Account number",      "hint": "Money will be credited to this account",      "value_autofill": "currentuser_accountkey",      "pattern": "[0-9]{11,33}"}
Autofill macros:
macro_name Description
currentuser_accountkey Substitutes the account number of the Yandex.Money user, if known.
calendar_next_month Substitutes a yyyy-mm value in a month type field, for the next month after the current calendar month.
currentuser_email Substitutes login@yandex.ru for an authorized user, if the login name is known.

Defining dates and times

Time calculations are based on the ISO 8601:2004 standard

Defining the complete date format: date string.

Format for specifying the complete date
YYYY-MM-DD

Defining the month and year format: month string.

Format for specifying the month and year
YYYY-MM

In the attributes of the date and month UI controls, you can specify:

  • The absolute value of the full date or the month and year.
  • To use the current date (now).
  • A value calculated from the absolute date value and an interval.
Example: Absolute date value
2014-08-19
Example: Substitute the current date
now

A value calculated from the absolute date value and an interval is defined in the section "4.4.4.2 Representations of time intervals by duration and context information" of the ISO 8601:2004 specification.

Use Basic Format to define the interval (duration):

PnYnMnD

Where:

  • P — A period (dot).
  • nY — The number of years (for example, 3Y).
  • nM — The number of months (for example, 10M).
  • nD — The number of days (for example, 5D).
Note. Unused symbols can be omitted. For example, you can specify an interval as 3Y or 2M10D or 5D.
To specify a date in the past, use the extended format defined in the section "4.4.4.4 Representations of time interval identified by duration and end" of the ISO 8601:2004 specification:
PnYnMnD/YYYY-MM-DDorPnYnMnD/now 
To specify a date in the future, use the extended format defined in the section "4.4.4.3 Representations of time interval identified by start and duration" of the ISO 8601:2004 specification:
YYYY-MM-DD/PnYnMnDornow/PnYnMnD
Example: The selected payment period must be no earlier than three years ago
{  "type": "month",  "name": "period",  "label": "Payment period",  "required": true,  "readonly": false,  "min": "P3Y/now"}
Example: The selected payment period must be no later than next month
{  "type": "month",  "name": "period",  "label": "Payment period",  "required": true,  "readonly": false,  "max": "now/P1M"}
Example: The selected date must be no earlier than 1 January 2005, and no later than 3.5 years after 2 January 2009
{  "type": "date",  "name": "document_date",  "label": "Resolution date",  "required": true,  "readonly": false,  "min":"2005-01-01",  "max": "2009-01-02/P3Y6M"}