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:
Navigate to System > Deposit system > Deposit methods or to System > Payout system > Payout methods.
Select the deposit or withdrawal method that uses the Constructor provider.
To navigate to the method details, click the Edit button.
On the Settings tab, navigate to the Custom fields section, and then click Add field.
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.
Click Save to add the custom field.
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.
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:
Navigate to the details of a deposit or withdrawal method that uses the Constructor provider.
On the Settings tab, navigate to the Custom fields section.
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.
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:
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
).
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:
Navigate to the details of a deposit or withdrawal method that uses the Constructor provider.
On the Settings tab, navigate to the Custom fields section.
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.
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
).
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