ERIP System Integration in Mobile Application
ERIP (Unified Settlement and Information Space) is a Belarusian inter-bank payment system. Differs from most payment gateways: ERIP does not process card credentials, but creates an invoice in the system which user pays via any Belarusian bank — internet banking, mobile banking, terminal, or counter. For mobile app this means payment happens outside your application.
How ERIP Works in Mobile Context
Your app creates an invoice in ERIP via API, gets invoice number (QR code or numeric code), user pays via their banking app. System notifies your server about payment via callback.
Two technical connection variants:
- Direct connection to ERIP — via NCFO "ERIPS" directly, requires contract and certificate
- Via aggregator — Webpay, iPay, bePaid accept ERIP payment and provide simpler API
Integration via bePaid Aggregator
bePaid is a Belarusian payment gateway with ERIP API support. Most convenient for mobile apps.
Server Side: Creating Transaction with ERIP
POST https://checkout.bepaid.by/transactions/payment_token
Authorization: Basic base64(shop_id:secret_key)
Content-Type: application/json
{
"checkout": {
"transaction_type": "payment",
"order": {
"amount": 1500,
"currency": "BYN",
"description": "Order #1234",
"tracking_id": "ORDER-1234"
},
"settings": {
"success_url": "yourapp://payment/success",
"decline_url": "yourapp://payment/decline",
"fail_url": "yourapp://payment/fail",
"notification_url": "https://your-server.com/bepaid/notify"
},
"payment_method": {
"types": ["erip"],
"erip": {
"service_no": 12345678, // your service number in ERIP
"account_number": "ORDER-1234",
"service_info": ["Payment for order #1234"]
}
}
}
}
Response contains checkout_url — link to bePaid page with ERIP QR code.
Mobile Client: QR Code Display
Two variants:
1. WebView with bePaid page — open checkout_url in WebView or SFSafariViewController / Chrome Custom Tabs. bePaid page shows QR code and instructions.
2. Native screen with QR — server gets ERIP account data, app generates QR itself.
// Android: QR generation via ZXing
implementation("com.google.zxing:core:3.5.2")
implementation("com.journeyapps:zxing-android-embedded:4.3.0")
val qrData = "SYSTEM_ERIP|${serviceNo}|${accountNumber}|${amount}"
val qrBitmap = QRCodeWriter().encode(
qrData,
BarcodeFormat.QR_CODE,
512,
512
).let { bitMatrix ->
val width = bitMatrix.width
val height = bitMatrix.height
Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565).apply {
for (x in 0 until width) {
for (y in 0 until height) {
setPixel(x, y, if (bitMatrix[x, y]) Color.BLACK else Color.WHITE)
}
}
}
}
imageView.setImageBitmap(qrBitmap)
// iOS: CoreImage QR generation
import CoreImage
func generateQRCode(from string: String) -> UIImage? {
let filter = CIFilter.qrCodeGenerator()
filter.message = Data(string.utf8)
filter.correctionLevel = "M"
guard let outputImage = filter.outputImage else { return nil }
let scale = UIScreen.main.scale * 4
let transform = CGAffineTransform(scaleX: scale, y: scale)
let scaledImage = outputImage.transformed(by: transform)
return UIImage(ciImage: scaledImage)
}
let qrData = "SYSTEM_ERIP|\(serviceNo)|\(accountNumber)|\(amount)"
qrImageView.image = generateQRCode(from: qrData)
Status Polling and Push-Notification
ERIP is asynchronous system. User may pay in 5 minutes or 2 hours. Two approaches to track:
Webhook (recommended). bePaid / Webpay sends POST to notification_url upon payment. Server gets notification, updates order, sends Push to user via FCM/APNs.
Polling. Client periodically checks status with your server. Loads server, but simpler:
// Android: polling via coroutines
private fun startPaymentPolling(orderId: String) {
lifecycleScope.launch {
repeat(60) { // maximum 60 attempts
delay(5000L) // every 5 seconds
val status = paymentRepository.checkStatus(orderId)
if (status == PaymentStatus.PAID) {
handleSuccess()
return@launch
}
}
// After 5 minutes — suggest checking manually
}
}
Direct ERIP Connection (For Large Merchants)
With direct connection use ERIPS SOAP API. Requires:
- Contract with NCFO "ERIPS"
- Certificate receipt
- XML signature request setup
Technically more complex, but more control: create invoices with arbitrary details, get transaction details.
Typical Issues
User paid, but invoice not closed. Webhook didn't arrive due to network error. Need implement webhook retry attempts or periodic reconciliation — status sync via aggregator API.
QR not scanned by banking app. ERIP-QR format is strictly standardized. Use NCFO "ERIPS" specification for string formation — arbitrary format won't work.
Work Scope
- ERIP connection via aggregator (bePaid, Webpay) or direct
- Server endpoint for ERIP invoice creation
- Native screen with QR code or WebView with checkout page
- Webhook handler for payment status
- Push notification to user after successful payment
Timeline
3–5 days for aggregator integration with native QR screen. Cost calculated individually after requirements analysis and aggregator selection.







