Skip to main content

External Integrations

Kulpay API integrates with several external services to provide identity verification, payment processing, file storage, and communication capabilities.

Integration Architecture

Core Banking: BLNK

BLNK is the core banking engine powering the Kulpay digital wallet. It is not simply a payment adapter — it is the central ledger that manages all wallet balances, identities, and transactions with double-entry accounting guarantees.

CapabilityDescription
Identity ManagementEach customer is linked to a BLNK identity via Account.identity_id
Balance ManagementWallet balances are maintained in BLNK via Account.balance_id
Double-Entry LedgerAll transactions are recorded with debit/credit entries
Transfer ProcessingWallet-to-wallet transfers, deposits, and withdrawals
Balance QueriesReal-time balance lookups
Transaction HistoryFull ledger history for each identity

Technical Decision: BLNK was chosen as the core banking engine rather than building an in-house ledger. This provides battle-tested double-entry accounting, eliminates the risk of balance inconsistencies, and allows Kulpay API to focus on business logic while BLNK handles financial integrity. The Account model in Kulpay API stores only identity_id and balance_id references — all balance state lives in BLNK.

Integration Flow

Identity Verification

MiniAiLive (Biometrics)

MiniAiLive provides biometric verification services for the KYC process.

CapabilityDescription
Liveness DetectionVerifies that the selfie is from a live person, not a photo or video
Face MatchingCompares the selfie against the ID document photo
Document OCRExtracts text data from identity documents (name, DOB, ID number, address)

Integration Flow:

NUIB API

The NUIB (National Unified Identification Bureau) API provides government-level identity verification for Mozambican customers.

CapabilityDescription
Identity LookupVerifies customer identity against national records
Data Cross-referenceConfirms name, DOB, and ID number match government data
Compliance CheckRequired for regulatory compliance in Mozambique

Communication

SMS Provider

Used for OTP delivery during customer onboarding and transaction authorization.

Use CaseDescription
Phone VerificationSends 6-digit OTP during account creation
Transaction AuthorizationSends authorization codes for financial operations
KYC NotificationsNotifies customers of KYC status changes
Account NotificationsAccount recharge and transaction confirmations

Storage: Minio

Kulpay API uses a self-hosted Minio instance for all file storage needs. Minio provides an S3-compatible object storage API.

CapabilityDescription
Document StorageID document images (front/back)
Selfie StorageCustomer selfie/liveness images
Profile PicturesCustomer profile photos
Business LogosPartner and bill business logos
File RetrievalBase64-encoded download via file links

Files are organized into buckets and referenced via UploadedFile objects containing file_id, file_bucket, and file_link.

Technical Decision: Minio was chosen over cloud storage providers (S3, GCS) to maintain full data sovereignty. Since Kulpay API processes sensitive identity documents and financial data, self-hosting the file server ensures that all data remains within the partner's infrastructure without external dependencies.

QR Code Service

An in-house developed QR code management service used for customer identification and fund transfers.

CapabilityDescription
QR GenerationCreates unique QR codes for customers upon KYC verification
Scan TrackingRecords when and how many times a QR code is scanned
Customer LookupResolves a QR code to a customer identity for transfers
Agent IntegrationAgents scan customer QR codes for deposits and withdrawals

Each customer's qrcode_id field links to their QR code in this service. QR codes serve as a convenient alternative to account numbers for in-person transactions.

Technical Decision: The QR code service was developed in-house rather than using a third-party solution to enable deep integration with the customer lifecycle (auto-generation on KYC approval) and to add scan tracking analytics that off-the-shelf QR solutions don't provide.

Payment Adapters

Kulpay API uses an adapter pattern to support multiple payment providers through a unified interface. The Instruction Engine routes each instruction to the appropriate adapter based on the payment method type.

Adapter Architecture

Kulpay Adapter (BLNK)

Routes wallet operations to the BLNK core banking engine.

OperationDescription
Balance QueryCheck wallet balance
DepositAdd funds to wallet
TransferSend funds to another wallet
WithdrawalRemove funds from wallet
HistoryRetrieve transaction history

Card Simo Adapter

Handles card-based payment processing through the SIMORede platform.

OperationDescription
ValidationValidate card details
AuthorizationGet transaction authorization
Pay InProcess card payment
Pay OutProcess card payout

Bank Adapter

Traditional banking operations adapter (extensible for multiple bank integrations).

OperationDescription
TransferBank transfer via NIB
BalanceAccount balance query

Technical Decision: The adapter pattern was chosen to decouple transaction processing from specific payment providers. Adding a new payment provider requires implementing a single adapter interface without modifying the instruction engine or any service logic. This makes the system extensible for new banking partners.