We have integrated ERIP (Unified Settlement and Information Space) on dozens of websites—from online stores to payment services. Without this system, you lose up to 40% of buyers from Belarus: they simply cannot pay in their preferred way. ERIP is a state payment system covering over 99% of banks and terminals (official data from the National Bank of the Republic of Belarus). Users pay via internet banking (SDBO of Sberbank, Belaruskbank), ATMs, and mobile apps. We guarantee correct processing of each payment and full support at all stages of integration: from bank-agent selection to production launch.
With over 7 years of experience and 15 completed projects, we ensure reliable ERIP integration. Typical integration costs range from $500 to $2000, with potential savings of up to 20% on transaction fees compared to alternative payment methods.
Why ERIP integration is mandatory?
Without ERIP, you lose a significant share of your audience. According to statistics, over 60% of Belarusian users prefer to pay via ERIP, especially through SDBO of Sberbank and Belaruskbank. If your site does not support this system, customers go to competitors. Moreover, for many business types (online stores, housing and utilities, insurance), having ERIP is required by law.
ERIP Architecture
There are two ways to connect:
- Through a bank agent — the bank (Belaruskbank, Priorbank, BSG Bank, etc.) provides an ERIP API for Check and Pay requests. Agreement with one bank, bank API.
- Directly via OSMP/FTOS — requires a separate agreement with ERIP operator, more complex infrastructure.
For most projects, the bank agent route is chosen. Let's consider integration through the most common options.
How to choose a bank agent?
| Bank Agent | API Type | Average Response Time | Integration Complexity |
|---|---|---|---|
| BSG Bank | WSCP (XML) | ~200 ms | Medium |
| Belaruskbank | Web service (SOAP) | ~500 ms | High |
| Priorbank | REST (JSON) | ~150 ms | Low |
BSG Bank's WSCP API processes requests in ~200 ms on average, which is 2.5 times faster than Belaruskbank's web service (500 ms). Priorbank offers a modern REST API with minimal latency. Selecting the optimal bank depends on your tasks—we help with the choice and documentation.
How it works
ERIP operates in Pull mode: it is not a redirect scheme. The buyer enters your service number in ERIP (e.g., 'Online stores → YourStore → Enter order number'). ERIP requests order information from your server (Check request), then after payment sends a notification (Pay request).
Your server must implement an XML request handler from ERIP.
PHP code example for ERIP handler
class EripController extends Controller
{
public function handle(Request $request): Response
{
$xml = simplexml_load_string($request->getContent());
$command = (string)$xml->command['type'];
return match ($command) {
'check' => $this->check($xml),
'pay' => $this->pay($xml),
default => $this->error('Unknown command'),
};
}
private function check(\SimpleXMLElement $xml): Response
{
$accountNo = (string)$xml->customer->account;
$order = Order::where('erip_account', $accountNo)
->where('status', 'pending')
->first();
if (!$order) {
return $this->xmlResponse(200, 'Service not found');
}
$responseXml = <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<response>
<result>
<errorCode>0</errorCode>
<errorDescription>Success</errorDescription>
</result>
<customer>
<account>{$accountNo}</account>
</customer>
<fields>
<field tag="250" tagName="Amount to pay" value="{$order->total}"/>
<field tag="251" tagName="Order number" value="{$order->id}"/>
</fields>
<amount>{$order->total}</amount>
<currency>933</currency>
<info>Order #{$order->id} from {$order->created_at->format('d.m.Y')}</info>
</response>
XML;
return response($responseXml, 200)
->header('Content-Type', 'application/xml; charset=utf-8');
}
private function pay(\SimpleXMLElement $xml): Response
{
$accountNo = (string)$xml->customer->account;
$transId = (string)$xml->transaction['id'];
$amount = (float)$xml->transaction->amount;
$paymentDate = (string)$xml->transaction['date'];
$order = Order::where('erip_account', $accountNo)
->where('status', 'pending')
->lockForUpdate()
->first();
if (!$order) {
return $this->xmlResponse(100, 'Account not found');
}
if (abs($amount - $order->total) > 0.01) {
return $this->xmlResponse(200, 'Invalid amount');
}
// Idempotence — do not process duplicates
if (EripTransaction::where('transaction_id', $transId)->exists()) {
return $this->xmlResponse(0, 'Already processed');
}
DB::transaction(function () use ($order, $transId, $amount, $paymentDate) {
EripTransaction::create([
'transaction_id' => $transId,
'order_id' => $order->id,
'amount' => $amount,
'paid_at' => $paymentDate,
]);
$order->update(['status' => 'paid']);
});
return $this->xmlResponse(0, 'Accepted');
}
private function xmlResponse(int $code, string $message): Response
{
$xml = <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<response>
<result>
<errorCode>{$code}</errorCode>
<errorDescription>{$message}</errorDescription>
</result>
</response>
XML;
return response($xml, 200)
->header('Content-Type', 'application/xml; charset=utf-8');
}
}
ERIP account number
Each order is assigned a unique account number. Usually it is the order ID itself, but some banks require a specific format (e.g., 15-digit number). This number is shown to the buyer and entered in the ERIP terminal.
The account number should be generated in advance and shown to the buyer on the checkout page:
// Generate ERIP account number
$order->erip_account = str_pad($order->id, 12, '0', STR_PAD_LEFT);
QR code for ERIP
To simplify payment via mobile apps, you can generate a QR code with ERIP data. The QR format is defined by the bank agent; usually it is a deep link like:
erip://pay?service_code=XXXXX&account=000000012345
use Endroid\QrCode\QrCode;
$qrCode = QrCode::create("erip://pay?service_code={$serviceCode}&account={$order->erip_account}")
->setSize(200);
Setting up in the ERIP service tree
Your service must be registered in the ERIP service tree—this is done through the bank agent. The procedure includes: filling out an application, agreeing on a place in the tree (e.g., 'Online stores → [Region] → Store name'), testing. Registration and testing take from 5 to 15 business days. Changing the position in the tree after registration is a separate request and another 5–10 days.
Security
Requests from ERIP must only be accepted from the bank agent's IP addresses. The IP list is provided by the bank. Additionally, use HTTPS with mutual authentication (mutual TLS) or HMAC signing depending on the bank.
// Middleware to check IP
public function handle(Request $request, Closure $next): Response
{
$allowedIps = explode(',', env('ERIP_ALLOWED_IPS'));
if (!in_array($request->ip(), $allowedIps)) {
return response('Forbidden', 403);
}
return $next($request);
}
What is included in the work?
- Analysis of current payment infrastructure
- Selection and connection of a bank agent (help with documents)
- Implementation of Check/Pay request handler in PHP
- Generation of QR codes for mobile apps
- Registration in the ERIP service tree (support)
- Testing in test and production environments
- Training your team on the system
- Post-launch support (1 month free)
Order an audit of your current payment system for ERIP compatibility. We will help you connect payments quickly and without errors.







