POS SDK overview

Accept payments from the Blinc Consumer App in your Android POS application, using NFC (Tap to Pay) or QR Code.

The Blinc POS SDK allows your Android POS application to accept payments from the Blinc Consumer App using NFC (Tap to Pay) or QR Code.

The drop-in UI variant (blinc-pos-sdk-ui) provides a complete, managed payment flow. The SDK launches its own Activity, displays all payment screens, and returns a TransactionResult when the flow completes. Your app receives the result through a registered launcher callback, so you never have to manage the SDK's screens or navigation.

This is the standard way to integrate Blinc POS

The SDK manages every payment screen and all navigation, so you add a dependency, register a callback, and call one method to take a payment. Most integrations need nothing else.

Artifactio.github.blinc-technologies:blinc-pos-sdk-ui
Version0.1.2
PlatformsAndroid Native, Flutter, React Native
Minimum SDK24 (Android 7.0)
Target SDK34 (Android 14)

Quick Start

Minimum code to get a payment running. Read the full guide before going to production.

1. Add the dependency

dependencies {
    implementation("io.github.blinc-technologies:blinc-pos-sdk-ui:0.1.2")
}

2. Register the launcher, then start a transaction

class MainActivity : ComponentActivity() {
    private val viewModel: PosViewModel by viewModels()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        // Step 1: Register the result launcher BEFORE setContent
        BlincPosSdk.registerLauncher(this) { result ->
            when (result.status) {
                TransactionResult.Status.SUCCESS   -> showSuccess(result.transactionId)
                TransactionResult.Status.CANCELLED -> { /* user cancelled */ }
                else                               -> showError(result.message)
            }
        }

        setContent {
            PosScreen(onPay = {
                viewModel.ensureRegisteredThenRun {
                    BlincPosSdk.startTransactionWithNFC(
                        context = this,
                        amount  = 199900L  // 1,999.00 NGN in kobo
                    )
                }
            })
        }
    }
}

ensureRegistered() handles the backend challenge fetch and terminal registration only when they are actually needed. On every subsequent launch it returns immediately with no network call. See How registration works and the Production example for the full ViewModel pattern.

Never on the main thread

The challenge fetch is a network call and must not run on the main thread. ensureRegistered() is a suspend function: call it from a coroutine. The Production example shows the correct pattern.


Did this page help you?