How to add custom fields for the Constructor deposit or withdrawal method

You can add and set up custom fields for deposit and withdrawal methods that use the Constructor provider.

To add a custom field:

  1. Navigate to System > Deposit system > Deposit methods or to System > Payout system > Payout methods.

  2. Select the deposit or withdrawal method that uses the Constructor provider.

  3. To navigate to the method details, click the Edit button.

  4. On the Settings tab, navigate to the Custom fields section, and then click Add field.

  5. In the Add field popup, fill in the following fields:

    • In the Caption field, enter a field name. The name will be displayed in the B2CORE UI.

      You can optionally add localizations to the field name by clicking the button on the right side of the Caption field and providing translations for the required languages. When switching languages in the B2CORE UI, the field name will be displayed according to the selected language.

    • In the Type dropdown, select a field type. The following types are available:

      • Text — to add a text field.

      • Select with autocomplete — to add a field with predefined options. When a client begins typing in this field, options that match the entered characters are displayed, enabling the client to select the desired one.

      • File — to add a field for attaching a document necessary for depositing or withdrawing funds.

  6. Click Save to add the custom field.

  7. To configure properties of the newly added field, click the Edit button located in the field row:

    • In the displayed Main field settings section, you can make the field mandatory by selecting required in the Rules field.

    • For a field of the Select with autocomplete type, add a list of predefined options. The options can be added manually or uploaded automatically by connecting to an appropriate API resource (for details, refer to How to upload a list of predefined options for a custom field)

    • For a field of the File type, in the Document type dropdown, select the type of a document that clients should attach. The list of available document types includes all the types configured on the Verification > Document types page.

      Clients can attach files in JPEG, PNG, or PDF format with the file size up to 3 MB.

Currently, only one field for attaching files can be added for the Constructor method.

  1. Click Save to apply the changes.

When clients deposit or withdraw funds with the Constructor method, the added custom fields are displayed to them in the same order as they are listed in the Custom fields section of the Back Office.

How to upload a list of predefined options for a custom field

For each custom field of the Select with autocomplete type, you can automatically upload predefined options that clients can select when they deposit or withdraw funds in the B2CORE UI.

For example, instead of manually adding bank names as predefined options for the “Bank name” field, you can retrieve them from an appropriate resource defined for your application API.

To upload a list of predefined options for a custom field:

  1. Navigate to the details of a deposit or withdrawal method that uses the Constructor provider.

  2. On the Settings tab, navigate to the Custom fields section.

  3. Select a field of the Select with autocomplete type for which you want to upload a list of predefined options (such as “Bank name”), and then click Edit.

  4. Navigate to the Field dynamic options section, which is displayed below the Custom fields list, and specify the following fields:

  • In the Endpoint field, specify a URL of a specific API resource that includes field values that you want to use as predefined options for the selected custom field.

    The structure of the specified API resource is displayed in the Endpoint result preview field. The following example illustrates a possible resource structure:

Show example
[
  {
    "id": 1,
    "bankId": 1,
    "bankName": "Bank name 1",
    "countryId": 1,
    "countryName": "UAE"
  },
  {
    "id": 1,
    "bankId": 2,
    "bankName": "Bank name 2",
    "countryId": 1,
    "countryName": "UAE"
  },
  {
    "id": 1,
    "bankId": 3,
    "bankName": "Bank name 3",
    "countryId": 2,
    "countryName": "Georgia"
  },
  {
    "id": 1,
    "bankId": 4,
    "bankName": "Bank name 4",
    "countryId": 2,
    "countryName": "Georgia"
  },
  {
    "id": 1,
    "bankId": 5,
    "bankName": "Bank name 5",
    "countryId": 2,
    "countryName": "Georgia"
  }
]
  • In the Options from key dropdown, select the root element of the specified API resource.

  • In the Option value from key dropdown, select the resource field specifying the values of predefined options displayed for the custom field (such as bankId).

  • In the Option caption from key dropdown, select the resource field specifying the captions of the predefined options (such as bankName).

  1. Click Save to apply the changes.

The list of predefined options for the “Bank name” custom field includes all the values retrieved from the bankName fields of the sample API resource.

How to dynamically form a list of predefined options for a custom field

A list of predefined options for a custom field can be formed dynamically and contain different options depending on the option that is selected from the custom field with which it is associated.

For example, a list of predefined options for the “Bank name” field can depend on the country that is selected in the “Country” field.

To form dynamic lists of predefined options, both the associated custom fields must be populated with the options retrieved from the same API resource (for details, refer to How to upload a list of predefined options for a custom field).

To dynamically form a list of predefined options for a custom field:

  1. Navigate to the details of a deposit or withdrawal method that uses the Constructor provider.

  2. On the Settings tab, navigate to the Custom fields section.

  3. Select a field of the Select with autocomplete type for which you want to form a dynamic list of predefined options (such as “Bank name”), and then click Edit.

  4. Navigate to the Field dynamic options section, which is displayed below the Custom fields list, and specify the following field settings:

  • In the Depends on field dropdown, select another custom field (such as “Country”) that you want to associate with the “Bank name” field.

  • In the Depends on field by key dropdown, select the resource field that will be used to filter the options for the “Bank name” field (such as countryId).

  1. Click Save to apply the changes.

The list of bank names displayed for the “Bank name” field depends on the country that was previously selected by a client from the “Country” field.

Last updated