How to add the Constructor deposit or withdrawal method
You can use the Constructor method for deposits or withdrawals when customization is needed to meet specific requirements.
With Constructor methods, you can add and configure fields that clients must fill in when making deposits or withdrawals in the B2CORE UI. This flexibility is useful when additional details, such as bank information, payment references, or required documents, must be provided by clients.
By ensuring that all necessary information is collected, these methods help streamline deposit and withdrawal processing.
To add the Constructor method for deposits or withdrawals:
Navigate to System > Deposit system > Deposit methods or to System > Payout system > Payout methods.
Click +Create in the upper-right page corner.
On the Create method page, fill in the following fields:
In the Name field, enter a name for the method, such as
Constructor
. The name must be unique and may only contain Latin letters, numbers, dashes, and underscores.In the Caption field, enter a caption for the method. This caption will be assigned to the method in the Back Office and will be visible to clients in the B2CORE UI.
In the Provider dropdown, select Constructor.
In the displayed Currency dropdown, select a currency for deposits or withdrawals. After creating the method, you can add multiple currencies to it on the TR Currencies tab.
Leave the Connection dropdown empty.
Click Save to create the method.
The Constructor method will appear in the list of methods.
Click Edit to enter the method details and complete the following fields:
On the Settings tab, select one or more groups in which the method should be included, such as Fiat, Crypto, or both.
Review the currencies added on the TR Currencies and PS Currencies tabs, and add more if necessary (for tab descriptions, refer to Deposit methods or Payout methods).
Check the method status.
Keep the method inactive (No is displayed in the Enabled field) until the method configuration is fully completed, including adding custom fields. Once done, activate the method.
Click Save to apply the changes.
The initial setup of the Constructor method is complete. Next, proceed with adding the required custom fields.
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.
Click Edit to enter the method details.
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.
Once you have completed the method configuration, activate it by selecting Yes in the Enabled dropdown.
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 (such as the following sample endpoint:
https://[host]/api/banks
).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 (such as
root
).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.
In the B2CORE UI, the list of predefined options for the “Bank name” custom field will include 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, with the available options changing based on the selection made in an associated field.
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
countryCode
).
Click Save to apply the changes.
In the B2CORE UI, the list of bank names displayed for the “Bank name” field will be filtered based on the country selected by the client in the the “Country” field.
Last updated
Was this helpful?