Skip to main content

Classes Reference

All classes are in the com.microblink or com.microblink.core package unless noted. Data is exposed via accessor methods (Java-style getters); all objects implement Parcelable unless stated otherwise.


BlinkReceiptSdk

Singleton object for SDK initialization and global configuration. Call initialize() in Application.onCreate() before using any other SDK API.

Package: com.microblink

Declaration

object BlinkReceiptSdk

Initialization

initialize(context)

fun initialize(context: Context)

Initializes the SDK. License key and product intelligence key must be set before calling.


initialize(context, callback)

fun initialize(context: Context, callback: InitializeCallback)

Initializes the SDK and notifies callback when complete.


initialize(context, licenseKey, callback)

fun initialize(context: Context, licenseKey: String, callback: InitializeCallback)

Initializes the SDK with a license key inline.


terminate()

fun terminate()

Shuts down the SDK and releases resources.


Properties

licenseKey()

fun licenseKey(): String?
fun licenseKey(key: String)

BlinkReceipt license key. Must be set before initialize().


productIntelligenceKey()

fun productIntelligenceKey(): String?
fun productIntelligenceKey(key: String)

Product Intelligence key. Required for enriched product data (name, brand, category, UPC).


clientUserId()

fun clientUserId(): String?
fun clientUserId(id: String)

Optional client-supplied user identifier for mapping scan data to your own user records.


initialized()

fun initialized(): Boolean

Returns true once initialize() has completed successfully.


onDeviceOcr()

fun onDeviceOcr(): Boolean
fun onDeviceOcr(enabled: Boolean)

Enables or disables on-device OCR processing. Requires minSdkVersiononDeviceMinSdkVersion.

Default: false


onDeviceMinSdkVersion

val onDeviceMinSdkVersion: Int // = 23

Minimum Android API level required for on-device OCR.


googleApiKey()

fun googleApiKey(): String?
fun googleApiKey(key: String)

Google API key, used for place/merchant lookup.


webApiKey()

fun webApiKey(): String?
fun webApiKey(key: String)

Web API key for server-side requests.


frameResults()

fun frameResults(): Boolean
fun frameResults(enabled: Boolean)

Whether to return per-frame results during scanning.

Default: false


daysToStoreScan(context)

fun daysToStoreScan(context: Context): Int?
fun daysToStoreScan(context: Context, days: Int)

Number of days scan data is retained on-device. Pass 0 to disable retention.


versionName(context)

fun versionName(context: Context): String

SDK version name string.


versionCode(context)

fun versionCode(context: Context): String

SDK version code identifier.


ScanResults

Holds all parsed data from a scan session. Produced by the SDK — construct via ScanResults.Builder only if building test fixtures; in production the SDK returns instances directly.

Package: com.microblink.core

Declaration

class ScanResults : Parcelable

Merchant & Store

retailerId()

fun retailerId(): Retailer

Retailer enum value identifying the merchant.


merchantName()

fun merchantName(): StringType?

Detected merchant or store name.


clientMerchantName()

fun clientMerchantName(): String?

Client-supplied merchant name override.


merchantMatchGuess()

fun merchantMatchGuess(): StringType?

SDK's best-guess merchant match when exact identification is uncertain.


merchantSource()

fun merchantSource(): String?

Identifier for the data source used to identify the merchant.


merchantSources()

fun merchantSources(): List<Int>?

Multiple source codes when more than one source contributed to merchant identification.


storeNumber()

fun storeNumber(): StringType?

Store or branch identifier.


storeAddress()

fun storeAddress(): StringType?

Street address of the store.


storeCity()

fun storeCity(): StringType?

City where the store is located.


storeState()

fun storeState(): StringType?

State or province.


storeZip()

fun storeZip(): StringType?

Postal or ZIP code.


storeCountry()

fun storeCountry(): StringType?

Country code for the store location.


storePhone()

fun storePhone(): StringType?

Store phone number as printed on the receipt.


mallName()

fun mallName(): StringType?

Name of the shopping mall or center, if applicable.


purchaseCountry()

fun purchaseCountry(): String?

Country where the purchase was made (may differ from store country for cross-border transactions).


Transaction

blinkReceiptId()

fun blinkReceiptId(): String

Unique identifier assigned to this scan by the BlinkReceipt backend.


transactionId()

fun transactionId(): StringType?

Transaction identifier extracted from the receipt.


longTransactionId()

fun longTransactionId(): StringType?

Extended or long-form transaction identifier.


registerId()

fun registerId(): StringType?

Cash register identifier.


cashierId()

fun cashierId(): StringType?

Cashier or employee ID.


channel()

fun channel(): StringType?

Transaction channel (e.g., in-store, online).


purchaseType()

fun purchaseType(): StringType?

Type of purchase as printed on the receipt.


taxId()

fun taxId(): StringType?

Tax identification number from the receipt.


barcodes()

fun barcodes(): List<Barcode>?

Barcodes detected on the receipt. See Barcode.


Purchase Date & Time

receiptDate()

fun receiptDate(): StringType?

Purchase date as extracted from the receipt.


receiptTime()

fun receiptTime(): StringType?

Purchase time as extracted from the receipt.


timeSeconds()

fun timeSeconds(): StringType?

Receipt time expressed as epoch seconds.


receiptDateTime()

fun receiptDateTime(): Date

Combined Date object representing the receipt's date and time.


submissionDate()

fun submissionDate(): Date

Date when the receipt was submitted for processing.


Totals

total()

fun total(): FloatType?

Total purchase amount. See FloatType.


subtotal()

fun subtotal(): FloatType?

Subtotal before tax.


taxes()

fun taxes(): FloatType?

Total tax amount.


tip()

fun tip(): FloatType?

Tip amount, if present.


cashback()

fun cashback(): Float

Cashback amount received at the register.


subtotalMatches()

fun subtotalMatches(): Boolean

true if subtotal + taxes ≈ total. A useful receipt-validity signal.


currencyCode()

fun currencyCode(): String?

ISO 4217 currency code (e.g., "USD").


Products & Items

products()

fun products(): List<Product>?

Line items parsed from the receipt. See Product.


productsPendingLookup()

fun productsPendingLookup(): Int

Count of products still awaiting Product Intelligence enrichment.


Payment

paymentMethods()

fun paymentMethods(): List<PaymentMethod>?

All payment methods used for the transaction. See PaymentMethod.


last4cc()

fun last4cc(): StringType?

Last four digits of the credit or debit card used.


authCode()

fun authCode(): StringType?

Payment authorization code.


aid()

fun aid(): StringType?

Application Identifier from EMV/chip card transactions.


paymentTerminalId()

fun paymentTerminalId(): StringType?

Terminal or register ID from the payment system.


paymentTransactionId()

fun paymentTransactionId(): StringType?

Payment-specific transaction identifier.


Loyalty & Member

loyaltyProgram()

fun loyaltyProgram(): Boolean

true if a loyalty program was detected on the receipt.


loyaltyForBanner()

fun loyaltyForBanner(): Boolean

true if loyalty applies to the store banner specifically.


memberNumber()

fun memberNumber(): String?

Loyalty membership or account number.


isInstacartShopper()

fun isInstacartShopper(): Boolean

true if the receipt originated from an Instacart shopper order.


Promotions & Surveys

qualified()

fun qualified(): List<Promotion>?

Promotions the receipt qualifies for. See Promotion.


unqualified()

fun unqualified(): List<Promotion>?

Promotions the receipt was evaluated for but did not qualify.


coupons()

fun coupons(): List<Coupon>?

Coupons applied on the receipt. See Coupon.


qualifiedSurveys()

fun qualifiedSurveys(): List<Survey>?

Surveys the user qualifies for based on this receipt. See Survey.


Quality & Validation

ocrConfidence()

fun ocrConfidence(): Float

OCR accuracy score, ranging from 0.0 to 1.0.


foundTopEdge()

fun foundTopEdge(): Boolean

true if the top edge of the receipt image was detected.


foundBottomEdge()

fun foundBottomEdge(): Boolean

true if the bottom edge of the receipt image was detected.


duplicate()

fun duplicate(): Boolean

true if this receipt is flagged as a potential duplicate of a previously submitted scan.


duplicateBlinkReceiptIds()

fun duplicateBlinkReceiptIds(): List<String>?

IDs of previously submitted receipts that this scan may be a duplicate of.


fraudulent()

fun fraudulent(): Boolean

true if the receipt is flagged as suspicious or fraudulent.


E-Receipt

eReceipt()

fun eReceipt(): Boolean

true if this result was parsed from an email receipt rather than a camera scan.


eReceiptOrderNumber()

fun eReceiptOrderNumber(): String?

Order number extracted from the receipt email.


eReceiptOrderStatus()

fun eReceiptOrderStatus(): String?

Order status at the time the email was parsed.


eReceiptEmailProvider()

fun eReceiptEmailProvider(): String?

Email provider (e.g., "Gmail", "Outlook").


eReceiptMerchantEmail()

fun eReceiptMerchantEmail(): String?

Sender email address of the receipt.


eReceiptEmailSubject()

fun eReceiptEmailSubject(): String?

Subject line of the receipt email.


eReceiptEmailId()

fun eReceiptEmailId(): String?

Internal email identifier.


eReceiptAuthenticated()

fun eReceiptAuthenticated(): Boolean

true if the receipt email passed sender authentication checks.


eReceiptPOSSystem()

fun eReceiptPOSSystem(): String?

POS system identified from the email content.


eReceiptSubMerchant()

fun eReceiptSubMerchant(): String?

Sub-merchant identifier (e.g., a marketplace seller).


eReceiptFulfilledBy()

fun eReceiptFulfilledBy(): String?

Fulfillment provider name.


eReceiptShippingCosts()

fun eReceiptShippingCosts(): Float

Shipping charges from the receipt email.


eReceiptShippingAddress()

fun eReceiptShippingAddress(): String?

Shipping or delivery address.


eReceiptShippingStatus()

fun eReceiptShippingStatus(): String?

Shipping or delivery status.


eReceiptAdditionalFees()

fun eReceiptAdditionalFees(): Map<String, String>?

Breakdown of additional fees (e.g., handling, service charges).


eReceiptRawHtml()

fun eReceiptRawHtml(): String?

Raw HTML body of the receipt email. Useful for debugging parser issues.


eReceiptComponentEmails()

fun eReceiptComponentEmails(): List<ScanResults>?

Sub-receipts parsed from a combined or multi-part email.


Raw Data

combinedRawText()

fun combinedRawText(): StringType?

Full concatenated OCR text from all receipt frames.


rawBasket()

fun rawBasket(): String?

Unprocessed text from the product/basket section of the receipt.


rawTripHeader()

fun rawTripHeader(): String?

Unprocessed text from the transaction header.


rawTripFooter()

fun rawTripFooter(): String?

Unprocessed text from the transaction footer.


rawData()

fun rawData(): String?

Full unprocessed OCR output string.


extendedFields()

fun extendedFields(): Map<String, String>?

Custom extended key-value fields appended by the SDK for retailer-specific data.


shipments()

fun shipments(): List<Shipment>?

Shipment records associated with the receipt (typically from e-receipts). See Shipment.


ScanOptions

Configures a scan session. Build via ScanOptions.Builder and pass to the recognizer before starting a scan.

Package: com.microblink

Declaration

class ScanOptions : Parcelable

Builder

val options = ScanOptions.Builder()
.countryCode("US")
.detectDuplicates(true)
.filterSensitiveData(true)
.build()

Properties

countryCode()

fun countryCode(): String
// Builder: .countryCode(String)

ISO country code for regional scanning and merchant matching configuration.


detectBarcodes()

fun detectBarcodes(): Boolean
// Builder: .detectBarcodes(Boolean)

Whether barcode detection is enabled during scanning.

Default: false


detectDuplicates()

fun detectDuplicates(): Boolean
// Builder: .detectDuplicates(Boolean)

Whether duplicate receipt detection is enabled.

Default: false


detectEdges()

fun detectEdges(): Boolean

Whether edge detection is enabled to identify receipt boundaries.


fun detectLogo(): Boolean
// Builder: .logoDetection(Boolean)

Whether merchant logo detection is enabled.

Default: false


edgeDetectionConfiguration()

fun edgeDetectionConfiguration(): EdgeDetectionConfiguration?
// Builder: .edgeDetectionConfiguration(EdgeDetectionConfiguration)

Configuration object for edge detection behavior.


filterSensitiveData()

fun filterSensitiveData(): Boolean
// Builder: .filterSensitiveData(Boolean)

Whether sensitive data (e.g., full credit card numbers) is redacted from results.

Default: false


frameCharacteristics()

fun frameCharacteristics(): FrameCharacteristics
// Builder: .frameCharacteristics(FrameCharacteristics)

Image frame characteristics configuration (resolution, quality thresholds).


merchantConfiguration()

fun merchantConfiguration(): MerchantConfiguration?
// Builder: .merchantConfiguration(MerchantConfiguration)

Merchant-specific configuration for detection and matching behavior.


promotionSlugs()

fun promotionSlugs(): List<Slug>?
// Builder: .promotionSlugs(List<Slug>)

Promotion slugs to evaluate against the receipt.


returnSubProducts()

fun returnSubProducts(): Boolean
// Builder: .returnSubProducts(Boolean)

Whether sub-products (e.g., combo components) are included in results.

Default: false


returnVoidedProducts()

fun returnVoidedProducts(): Boolean
// Builder: .returnVoidedProducts(Boolean)

Whether voided or cancelled line items are included in results.

Default: false


searchTargets()

fun searchTargets(): List<Product>?
// Builder: .searchTargets(List<Product>)

Target products to search for within the scanned receipt.


storeFrames()

fun storeFrames(): Boolean

Whether captured image frames are stored during the scan session.


validatePromotions()

fun validatePromotions(): Boolean
// Builder: .validatePromotions(Boolean)

Whether promotions should be validated against the receipt data.

Default: false


Product

Represents one line item on a receipt. Produced by the SDK from OCR results and optionally enriched with Product Intelligence data.

Package: com.microblink.core

Declaration

class Product : Parcelable

Receipt Properties

productNumber()

fun productNumber(): StringType?

SKU or product identification number as printed on the receipt.


description()

fun description(): StringType?

Product description text as printed on the receipt.


descriptionPrefix()

fun descriptionPrefix(): StringType?

Text prepended to the main description (e.g., a quantity modifier).


descriptionPostfix()

fun descriptionPostfix(): StringType?

Text appended to the main description.


quantity()

fun quantity(): FloatType?

Quantity purchased. See FloatType.


unitPrice()

fun unitPrice(): FloatType?

Price per single unit.


unitOfMeasure()

fun unitOfMeasure(): StringType?

Unit of measurement (e.g., "oz", "lb", "ea").


totalPrice()

fun totalPrice(): FloatType?

Total price for the line item (quantity × unitPrice).


fullPrice()

fun fullPrice(): Float

Full pre-discount price for the line item.


priceAfterCoupons()

fun priceAfterCoupons(): FloatType?

Final price after coupon discounts have been applied.


pricePostFix()

fun pricePostFix(): StringType?

Text appended to the price display (e.g., "/lb").


skuPrefix()

fun skuPrefix(): StringType?

Text prepended to the SKU.


skuPostfix()

fun skuPostfix(): StringType?

Text appended to the SKU.


voided()

fun voided(): Boolean

true if this line item was voided or cancelled on the receipt.


added()

fun added(): Boolean

true if this product was manually added rather than parsed from the receipt.


line()

fun line(): Int

Line number of this item on the receipt.


sensitive()

fun sensitive(): Boolean

true if this product has been flagged as sensitive data.


additionalLines()

fun additionalLines(): List<AdditionalLine>?

Supplementary lines associated with this product. See AdditionalLine.


subProducts()

fun subProducts(): List<Product>?

Nested child products (e.g., individual components of a combo item).


possibleProducts()

fun possibleProducts(): List<Product>?

Alternative product matches when the SDK cannot determine the best match with high confidence.


shippingStatus()

fun shippingStatus(): String?

Delivery or shipping state for this line item (primarily from e-receipts).


Product Intelligence Properties

The following properties are populated only when a Product Intelligence key is configured.

productName()

fun productName(): String?

Full standardized product name from the product database.


brand()

fun brand(): String?

Brand name.


upc()

fun upc(): String?

Universal Product Code (UPC/GTIN).


category()

fun category(): String?

Product category.


subCategory()

fun subCategory(): String?

Product sub-category.


majorCategory()

fun majorCategory(): String?

Top-level category grouping.


sector()

fun sector(): String?

Business sector classification.


department()

fun department(): String?

Retail department.


size()

fun size(): String?

Product size specification (e.g., "6.6 oz").


imageUrl()

fun imageUrl(): String?

URL of the product image.


blinkReceiptBrand()

fun blinkReceiptBrand(): String?

Brand as identified by the BlinkReceipt system (may differ from brand() after client modification).


blinkReceiptCategory()

fun blinkReceiptCategory(): String?

Category as identified by the BlinkReceipt system.


rewardsGroup()

fun rewardsGroup(): String?

Loyalty program rewards grouping for this product.


competitorRewardsGroup()

fun competitorRewardsGroup(): String?

Rewards group identifier for competitor program evaluation.


fuelType()

fun fuelType(): String?

Fuel category classification (for fuel products).


itemType()

fun itemType(): String?

Classification of the item type.


probability()

fun probability(): Double

Confidence score for the product match, from 0.0 to 1.0.


modified()

fun modified(): Boolean

true if any product field was modified after initial parsing.


productNameModified()

fun productNameModified(): Boolean

true if the product name was altered from the original parsed value.


brandModified()

fun brandModified(): Boolean

true if the brand was altered.


upcModified()

fun upcModified(): Boolean

true if the UPC was altered.


imageUrlModified()

fun imageUrlModified(): Boolean

true if the image URL was altered.


originalProductName()

fun originalProductName(): String?

The unmodified original product name before any corrections.


originalBrand()

fun originalBrand(): String?

The unmodified original brand.


originalUpc()

fun originalUpc(): String?

The unmodified original UPC.


originalImageUrl()

fun originalImageUrl(): String?

The unmodified original image URL.


originalQuantity()

fun originalQuantity(): FloatType?

The unmodified original quantity.


originalUnitPrice()

fun originalUnitPrice(): FloatType?

The unmodified original unit price.


originalTotalPrice()

fun originalTotalPrice(): FloatType?

The unmodified original total price.


attributes()

fun attributes(): List<Map<String, String>>?

Additional key-value attribute mappings from Product Intelligence.


extendedFields()

fun extendedFields(): Map<String, String>?

Custom extended field mappings for retailer-specific product data.


AdditionalLine

Represents a supplementary line associated with a product (e.g., a weight descriptor, a discount label).

Package: com.microblink.core

Declaration

class AdditionalLine(
type: StringType,
text: StringType,
lineNumber: Int
) : Parcelable

Properties

type()

fun type(): StringType?

The type or category of this additional line.


text()

fun text(): StringType?

The textual content of the line.


lineNumber()

fun lineNumber(): Int

The numeric position of this line on the receipt.


Barcode

Represents a barcode detected on a receipt.

Package: com.microblink.core

Declaration

open class Barcode : Parcelable

Properties

text()

fun text(): String?

The decoded barcode value.


type()

fun type(): BarcodeType?

The barcode format. See BarcodeType enum for possible values (e.g., QR, UPC-A, EAN-13).


Coupon

Describes one coupon or discount applied on a receipt.

Package: com.microblink.core

Declaration

class Coupon : Parcelable

Constructor:

Coupon(
couponType: CouponType?,
amount: FloatType?,
sku: StringType?,
description: StringType?
)
// or with related product:
Coupon(
couponType: CouponType?,
amount: FloatType?,
sku: StringType?,
description: StringType?,
relatedProductIndex: Int
)

Properties

couponType

val couponType: CouponType?

The type of coupon. See CouponType enum.


amount

val amount: FloatType?

The discount amount. See FloatType.


sku

val sku: StringType?

SKU associated with the coupon, if applicable.


description

val description: StringType?

Coupon description text as printed on the receipt.


relatedProductIndex

val relatedProductIndex: Int

Zero-based index into ScanResults.products() for the product this coupon applies to. Present only in the second constructor overload.


PaymentMethod

Represents one payment method used in a transaction.

Package: com.microblink.core

Declaration

class PaymentMethod(
paymentMethod: StringType?,
cardType: StringType?,
cardIssuer: StringType?,
amount: FloatType?
) : Parcelable

Properties

paymentMethod

val paymentMethod: StringType?

Payment method type (e.g., "credit", "cash", "EBT").


cardType

val cardType: StringType?

Card type (e.g., "Visa", "Mastercard").


cardIssuer

val cardIssuer: StringType?

Card issuer name.


amount

val amount: FloatType?

Amount charged to this payment method.


Promotion

Represents a promotion that was evaluated against a receipt.

Package: com.microblink.core

Declaration

class Promotion : Parcelable

Properties

id()

fun id(): Long

Server-assigned promotion identifier.


slug()

fun slug(): String?

Human-readable promotion slug (e.g., "summer-save-5").


reward()

fun reward(): BigDecimal?

Reward value for this promotion.


rewardCurrency()

fun rewardCurrency(): String?

Currency code for the reward amount.


errorCode()

fun errorCode(): Int

Error code from promotion evaluation. 0 indicates success.


errorMessage()

fun errorMessage(): String?

Human-readable error message if errorCode() != 0.


qualifications()

fun qualifications(): List<List<Int>>?

Groups of product indices that satisfy each qualification rule.


qualifiedProducts()

fun qualifiedProducts(): List<QualifiedProduct>?

Products that qualified for this promotion. See QualifiedProduct.


relatedProductIndexes()

fun relatedProductIndexes(): List<Int>?

Indices into ScanResults.products() for products related to this promotion.


QualifiedProduct

Identifies a product that qualified for a promotion.

Package: com.microblink.core

Declaration

class QualifiedProduct : Parcelable

Properties

productIndex()

fun productIndex(): Int

Zero-based index into ScanResults.products() for the qualifying product.


productGroups()

fun productGroups(): List<String>?

Promotion group identifiers the product belongs to.


Shipment

Represents one shipment in an order (typically from e-receipt parsing).

Package: com.microblink.core

Declaration

class Shipment : Parcelable

Properties

products()

fun products(): List<Product>

Products included in this shipment.


status()

fun status(): String

Shipment status string (e.g., "Delivered", "Shipped").


Survey

A survey the user qualifies for based on their receipt.

Package: com.microblink.core

Declaration

class Survey : Parcelable

Properties

serverId()

fun serverId(): Int

Server-assigned survey identifier.


slug()

fun slug(): String?

Human-readable survey identifier.


clientUserId()

fun clientUserId(): String?

Client-supplied user identifier associated with this survey instance.


startDate()

fun startDate(): String?

Survey availability start date.


endDate()

fun endDate(): String?

Survey availability end date.


rewardValue()

fun rewardValue(): String?

Reward value awarded upon survey completion.


questions()

fun questions(): List<SurveyQuestion>?

Ordered list of questions in this survey. See SurveyQuestion.


SurveyAnswer

One answer option within a SurveyQuestion.

Package: com.microblink.core

Declaration

class SurveyAnswer : Parcelable

Properties

serverId()

fun serverId(): Int

Server-assigned answer identifier.


text()

fun text(): String?

Display text of the answer option.


nextQuestionIndex()

fun nextQuestionIndex(): Int?

Index of the next question to show if the user selects this answer. null if this answer ends the survey.


SurveyQuestion

One question in a Survey.

Package: com.microblink.core

Declaration

class SurveyQuestion : Parcelable

Properties

serverId()

fun serverId(): Int

Server-assigned question identifier.


text()

fun text(): String?

Question text displayed to the user.


type()

fun type(): SurveyQuestionType?

Question type (e.g., multiple choice, free text). See SurveyQuestionType enum.


answers()

fun answers(): List<SurveyAnswer>?

Available answer options. See SurveyAnswer.


totalNumberOfQuestions()

fun totalNumberOfQuestions(): Int

Total number of questions in the parent survey.


myIndex()

fun myIndex(): Int

Zero-based position of this question within the survey.


nextQuestionIndex()

fun nextQuestionIndex(): Int

Default next question index (used when no answer-specific routing applies).


lastQuestion()

fun lastQuestion(): Boolean

true if this is the final question in the survey.


multipleAnswers()

fun multipleAnswers(): Boolean

true if the user may select more than one answer.


SurveyResponse

The user's response to a single SurveyQuestion.

Package: com.microblink.core

Declaration

class SurveyResponse : Parcelable

Properties

answersSelected()

fun answersSelected(): List<Int>?

Indices of the selected answers from the question's answers() list.


freeText()

fun freeText(): String?

Free-form text entered by the user in response to an open-ended question.


StringType

A string value paired with an OCR confidence score. Used throughout the SDK wherever the parsed value has associated extraction confidence.

Package: com.microblink.core

Declaration

class StringType : Parcelable

Constructors:

StringType(value: String?)
StringType(value: String?, confidence: Float)

Properties

value()

fun value(): String?

The parsed string value.


confidence()

fun confidence(): Float

OCR or parsing confidence score. StringType.DEFAULT_CONFIDENCE (100.0f) when not set explicitly.


has()

fun has(): Boolean

true if value() is non-null and non-empty.


FloatType

A float value paired with an OCR confidence score.

Package: com.microblink.core

Declaration

class FloatType : Parcelable

Constructors:

FloatType(value: Float)
FloatType(value: Float, confidence: Float)

Properties

value()

fun value(): Float

The raw float value.


confidence()

fun confidence(): Float

OCR or parsing confidence score.


decimal()

fun decimal(): Double
fun decimal(scale: Int): Double
fun decimal(scale: Int, mode: RoundingMode): Double

Returns the value rounded to 2 decimal places (default), a given scale, or with an explicit RoundingMode. Suitable for currency display.


toBigDecimal()

fun toBigDecimal(): BigDecimal

Non-null BigDecimal representation of the value.


IntType

An integer value paired with an OCR confidence score.

Package: com.microblink.core

Declaration

class IntType : Parcelable

Constructors:

IntType(value: Int)
IntType(value: Int, confidence: Float)

Properties

value()

fun value(): Int

The integer value.


confidence()

fun confidence(): Float

OCR or parsing confidence score.


toBigDecimal()

fun toBigDecimal(): BigDecimal

Non-null BigDecimal representation.


DateTime

Holds a parsed date and time from a receipt, with both string and Date representations.

Package: com.microblink.core

Declaration

class DateTime

Properties

date

var date: StringType?

The date portion as a StringType (carries confidence).


time

var time: StringType?

The time portion as a StringType.


dateTime

var dateTime: Date?

A combined java.util.Date built from date and time. null if either component is missing or unparseable.