Requisite Selection
Stage 1. Trader selection in Core
Section titled “Stage 1. Trader selection in Core”Filters run in this order, and a trader has to clear all of them:
-
ID — the trader is in the
listof the merchant’s gateway settings. -
Method — the requested requisite type is enabled for the trader.
-
Direction — the trader is not locked for
pay/payouttraffic. -
Currency —
default_currency, the currency the trader was created with, matches the request currency. -
Balance — for payin, the main wallet covers the amount.
-
Maximum —
amount < max_limit;0or no record disables the limit. -
Minimum —
amount > min_limit;0or no record disables the limit.
The general limits are strict on both ends: with min_limit of 21 an amount of exactly 21 is rejected, and with max_limit of 21 so is exactly 21.
Traders that fail a filter are skipped, not fatal: with several traders in list, one without balance or without a matching requisite simply hands the payment to the next one.
Stage 2. Requisite selection in Trader
Section titled “Stage 2. Requisite selection in Trader”After the first pass in Core, the list of traders is handed to the Trader service, where it goes through a second pass.
A candidate requisite must satisfy every condition:
-
The bank profile is not blocked.
-
The device the profile is bound to has the
activestatus. -
The requisite has the
activestatus. -
The requisite type matches the requested one.
-
min_amount <= amount. -
amount <= max_amount, unlessmax_amountis0. -
The unfinished operation count is below the concurrent limit.
-
Today’s used amount plus this amount stays within the daily amount limit.
-
Today’s operation count is below the daily transaction limit.
-
bank_namematches the profile’s bank when the request supplies one.
Devices are then excluded whole when they already hold a pending operation of the same amount and method — this is what the amount randomizer works around. One requisite is picked from what remains, weighted by conversion.
Amount uniqueness per device
Section titled “Amount uniqueness per device”A device can hold only one requisite issued for a given amount within a single requisite type at a time.
In other words, this constraint always holds: unique (amount, device_id, requisite_type) where status = pending and source = trader
