PHP After is a simple PHP library for BPJS Kesehatan Fingerprint integration.
It provides functions to register, verify, and reset BPJS participants’ fingerprints via the official BPJS Kesehatan API.
- Authenticate to BPJS Fingerprint server
- Register participant’s fingerprints (two fingers)
- Verify fingerprint using NIK or participant number
- Reset (delete) participant’s fingerprint
If you are using a web application with a DigitalPersona/HID device,
you must use the HID Authentication Device Client SDK
and completely uninstall any currently installed SDK before installation.
If this is not done, the integration will not work.
Example of use in vanilla, SEE HERE
Install the library via Composer:
composer require banguncode/php-afterEnsure PHP has the following extensions enabled:
- curl
- openssl
- PHP >= 5.5
- Extensions:
ext-curlandext-openssl - Valid BPJS Fingerprint account credentials
- Initialization & Authentication
<?php
require __DIR__ . '/vendor/autoload.php';
use PHPAfter\Fingerprint;
$fp = new Fingerprint();
$fp->init('VCLAIM_USERNAME', 'VCLAIM_PASSWORD');- Verify Biometrics
$result = $fp->verify(
'327102xxxxxxxxxx', // NIK (16 digits) or participant number (13 digits)
'AOh...' // Fingerprint minutiae (Base64)
);
print_r($result);- Register Biometrics [NOT YET TESTED]
$result = $fp->register(
'0001234567890', // Participant number (13 digits)
'APi...', // Right fingerprint minutiae (Base64)
'iVBOR...', // Right fingerprint image (Base64 JPEG/PNG)
'APi...', // Left fingerprint minutiae (Base64)
'iVBOR...' // Left fingerprint image (Base64 JPEG/PNG)
);
print_r($result);- Reset Biometrics
$result = $fp->reset(
'0001234567890', // Participant number
'02' // Reason (01 = Re-enrollment, 02 = Fingerprint damaged/disabled)
);
print_r($result);For the Postman collection, please check it HERE
This library is not affiliated with BPJS Kesehatan. You must be an authorized user with valid credentials to use the BPJS Kesehatan API, and you are responsible for complying with all applicable regulations.