Skip to main content

BRScanResults

Holds the scan results for a completed scanning session.

Declaration

@interface BRScanResults : NSObject <BRSerializable>
class BRScanResults : NSObject, BRSerializable

Quick Reference

Properties

PropertyDescription
retailerIdThe detected retailer ID.
merchantNameThe store name detected on the receipt, if any.
clientMerchantNameClient-specific merchant name passed back when available.
merchantGuessBest guess for the merchant based on receipt heuristics.
merchantSourcesMerchant detection methods that succeeded; nil if no merchant detected.
storeNumberThe store number detected on the receipt, if any.
storeAddressThe store street address detected on the receipt, if any.
storeCityThe store city detected on the receipt, if any.
storeStateThe store state detected on the receipt, if any.
storeZipThe store zip code detected on the receipt, if any.
storePhoneThe store phone number detected on the receipt, if any.
mallNameThe name of the mall in which the retailer is located, if any.
channelThe retail channel for this receipt, if any.
blinkReceiptIdUnique ID linking scan data to the receipt image stored by client.
barcodeBarcode detected on the receipt (Code 39, Code 128, ITF formats).
transactionIdTransaction ID detected on the receipt, if any.
longTransactionIdLonger transaction number, if any.
registerIdThe register ID detected on the receipt, if any.
cashierIdThe cashier ID detected on the receipt, if any.
currencyCodeThe currency identifier for this receipt, if identified.
purchaseTypeRepresents the type of purchase.
taxIdThe tax ID of the retailer, if any.
receiptDateThe purchase date formatted as MM/dd/yyyy, if any.
receiptTimeThe purchase time formatted as HH:mm, if any.
receiptTimeSecondsThe seconds component of the purchase time, if any.
totalThe total detected on the receipt, if any.
subtotalThe subtotal detected on the receipt, if any.
taxesTax amount detected on the receipt, if any.
tipTip amount detected on the receipt, if any.
cashbackCashback amount detected on the receipt.
productsArray of BRProduct objects detected on the receipt; some e-receipts return shipments instead.
couponsArray of BRCoupon objects detected on the receipt.
shipmentsArray of BRShipment objects representing all discovered shipments.
paymentMethodsArray of BRPaymentMethod objects found on the receipt.
last4CCThe last 4 digits of the credit card used, if any.
authCodeThe payment authorization code, if any.
aidThe payment application identifier, if any.
paymentTerminalIdUnique identifier for the payment processor's terminal.
paymentTransactionIdUnique identifier for the payment processor's transaction.
loyaltyProgramWhether a loyalty program indication was found on the receipt.
memberNumberLoyalty member number detected on the receipt, if any.
isInstacartShopperWhether the purchase was made by an Instacart shopper.
qualifiedPromotionsAll promotions validated against this receipt.
unqualifiedPromotionsAll promotions evaluated but not validated against this receipt.
qualifiedSurveysAll surveys validated against this receipt.
ocrConfidenceAverage OCR confidence across all scanned frames.
tripConfidenceTrip-level confidence score (0–100) computed at end of session.
itemConfidenceItem-level confidence score (0–100) computed at end of session.
serverLookupsCompletedWhether any server lookups were still pending when results were returned.
foundTopEdgeWhether the top edge of the receipt was found on any scanned frame.
foundBottomEdgeWhether the bottom edge of the receipt was found on any scanned frame.
subtotalMatchesWhether the detected subtotal matches the sum of all detected products and coupons.
productsPendingLookupNumber of products still awaiting intelligence results.
isDuplicateWhether this receipt was identified as a duplicate.
isFraudulentWhether this receipt is believed to be fraudulent.
duplicateBlinkReceiptIdsBlinkReceipt ID(s) of the duplicate receipts, if isDuplicate is true.
ereceiptOrderNumberOrder number for an Amazon or e-receipt order.
ereceiptOrderStatusOrder status for an e-receipt order.
ereceiptPurchaseTypeType of purchase for an Amazon or e-receipt order.
ereceiptRawHTMLRaw HTML parsed from the e-receipt email.
ereceiptEmailProviderName of the email provider from which the e-receipt was obtained.
ereceiptMerchantEmailThe sender address of the e-receipt email.
ereceiptEmailSubjectSubject line of the e-receipt email.
ereceiptEmailIdInternal message ID of the e-receipt email from the email provider.
ereceiptComponentEmailsBRScanResults from each component email when aggregation is on; only blinkReceiptId populated for different scrape sessions.
ereceiptFulfilledByThird-party fulfillment service, if any.
ereceiptSubMerchantSub-merchant name, if any.
ereceiptPOSSystemPoint of sale system used for the order, if any.
ereceiptShippingCostsShipping costs for this e-receipt, if any.
ereceiptAuthenticatedWhether the e-receipt email was authenticated via DKIM or SPF headers.
ereceiptIsValidWhether the email was successfully identified as an e-receipt or related message.
ereceiptAdditionalFeesAdditional fees/charges as key-value pairs (e.g., tips, bag fees).
extendedFieldsAdditional receipt fields not captured by standard properties.
combinedRawTextCumulative raw OCR text from all scanned frames.
rawBasketTextRaw product data results.
rawTripHeaderTextRaw text results found at the top of the receipt.
rawTripFooterTextRaw text results found at the bottom of the receipt.

Methods

MethodDescription
addUserCorrectedProduct(withBrand:upc:productName:imageUrl:totalPrice:quantity:)Adds a new user-corrected product to the results.
userCorrectedDate:Updates the receipt's purchase date with a user correction.
userCorrectedTotal:Updates the receipt's total with a user correction.
userCorrectedMerchant:Updates the receipt's merchant name with a user correction.

Properties

Merchant & Store

retailerId (read-only)

@property (nonatomic, readonly) WFRetailerId retailerId;
var retailerId: WFRetailerId { get }

The detected retailer ID. For future auto-detect retailer functionality.


merchantName (read-only)

@property (nonatomic, strong, readonly) BRStringValue *merchantName;
var merchantName: BRStringValue! { get }

The store name detected on the receipt, if any.


clientMerchantName (read-only)

@property (nonatomic, strong, readonly) BRStringValue *clientMerchantName;
var clientMerchantName: BRStringValue! { get }

Client-specific merchant name passed back when available.


merchantGuess (read-only)

@property (nonatomic, strong, readonly) NSString *merchantGuess;
var merchantGuess: String! { get }

Best guess for the merchant based on receipt heuristics.


merchantSources (read-only)

@property (nonatomic, strong, readonly) NSArray<NSNumber *> *merchantSources;
var merchantSources: [NSNumber]! { get }

An array of NSNumber objects wrapping BRMerchantSource values indicating which merchant detection method(s) succeeded in identifying the current merchant. nil if no merchant was detected (i.e. merchantName == nil).


storeNumber (read-only)

@property (nonatomic, strong, readonly) BRStringValue *storeNumber;
var storeNumber: BRStringValue! { get }

The store number detected on the receipt, if any.


storeAddress (read-only)

@property (nonatomic, strong, readonly) BRStringValue *storeAddress;
var storeAddress: BRStringValue! { get }

The store street address detected on the receipt, if any.


storeCity (read-only)

@property (nonatomic, strong, readonly) BRStringValue *storeCity;
var storeCity: BRStringValue! { get }

The store city detected on the receipt, if any.


storeState (read-only)

@property (nonatomic, strong, readonly) BRStringValue *storeState;
var storeState: BRStringValue! { get }

The store state detected on the receipt, if any.


storeZip (read-only)

@property (nonatomic, strong, readonly) BRStringValue *storeZip;
var storeZip: BRStringValue! { get }

The store zip code detected on the receipt, if any.


storePhone (read-only)

@property (nonatomic, strong, readonly) BRStringValue *storePhone;
var storePhone: BRStringValue! { get }

The store phone number detected on the receipt, if any.


mallName (read-only)

@property (nonatomic, strong, readonly) BRStringValue *mallName;
var mallName: BRStringValue! { get }

The name of the mall in which the retailer is located, if any.


channel (read-only)

@property (nonatomic, strong, readonly) BRStringValue *channel;
var channel: BRStringValue! { get }

The retail channel for this receipt, if any.


Transaction

blinkReceiptId (read-only)

@property (nonatomic, strong, readonly) NSString *blinkReceiptId;
var blinkReceiptId: String! { get }

Unique ID for this receipt which allows BlinkReceipt to correspond scan data to the correct receipt image stored by client.


barcode (read-only)

@property (nonatomic, strong, readonly) NSString *barcode;
var barcode: String! { get }

The barcode detected on the receipt, if any. Currently we recognize Code 39, Code 128, and ITF formats.


transactionId (read-only)

@property (nonatomic, strong, readonly) BRStringValue *transactionId;
var transactionId: BRStringValue! { get }

Transaction ID detected on the receipt, if any.


longTransactionId (read-only)

@property (nonatomic, strong, readonly) BRStringValue *longTransactionId;
var longTransactionId: BRStringValue! { get }

Some receipts contain a longer transaction number in addition to the standard one.


registerId (read-only)

@property (nonatomic, strong, readonly) BRStringValue *registerId;
var registerId: BRStringValue! { get }

The register ID detected on the receipt, if any.


cashierId (read-only)

@property (nonatomic, strong, readonly) BRStringValue *cashierId;
var cashierId: BRStringValue! { get }

The cashier ID detected on the receipt, if any.


currencyCode (read-only)

@property (nonatomic, strong, readonly) NSString *currencyCode;
var currencyCode: String! { get }

The currency identifier for this receipt, if identified.


purchaseType (read-only)

@property (nonatomic, strong, readonly) NSString *purchaseType;
var purchaseType: String! { get }

Represents the type of purchase (e.g., in-store, online).


taxId (read-only)

@property (nonatomic, strong, readonly) BRStringValue *taxId;
var taxId: BRStringValue! { get }

The tax ID of the retailer, if any.


Purchase Date & Time

receiptDate (read-only)

@property (nonatomic, strong, readonly) BRStringValue *receiptDate;
var receiptDate: BRStringValue! { get }

The purchase date formatted as MM/dd/yyyy, if any.


receiptTime (read-only)

@property (nonatomic, strong, readonly) BRStringValue *receiptTime;
var receiptTime: BRStringValue! { get }

The purchase time formatted as HH:mm, if any.


receiptTimeSeconds (read-only)

@property (nonatomic, strong, readonly) BRStringValue *receiptTimeSeconds;
var receiptTimeSeconds: BRStringValue! { get }

The seconds component of the purchase time formatted as SS, if any.


Totals

total (read-only)

@property (nonatomic, strong, readonly) BRFloatValue *total;
var total: BRFloatValue! { get }

The total detected on the receipt, if any.


subtotal (read-only)

@property (nonatomic, readonly) BRFloatValue *subtotal;
var subtotal: BRFloatValue! { get }

The subtotal detected on the receipt, if any.


taxes (read-only)

@property (nonatomic, readonly) BRFloatValue *taxes;
var taxes: BRFloatValue! { get }

The tax detected on the receipt, if any.


tip (read-only)

@property (nonatomic, readonly) BRFloatValue *tip;
var tip: BRFloatValue! { get }

The tip detected on the receipt, if any.


cashback (read-only)

@property (nonatomic, readonly) float cashback;
var cashback: Float { get }

Cashback amount detected on the receipt.


Products & Items

products (read-only)

@property (nonatomic, strong, readonly) NSArray<BRProduct *> *products;
var products: [BRProduct]! { get }

An array of BRProduct objects representing the products that were detected on the receipt, if any. Some e-receipts may return shipments with products instead of a products list directly.


coupons (read-only)

@property (nonatomic, strong, readonly) NSArray<BRCoupon *> *coupons;
var coupons: [BRCoupon]! { get }

Array of BRCoupon objects detected on the receipt.


shipments (read-only)

@property (nonatomic, strong, readonly) NSArray<BRShipment *> *shipments;
var shipments: [BRShipment]! { get }

An array of BRShipment objects representing all shipments discovered in this order.


Payment

paymentMethods (read-only)

@property (nonatomic, strong, readonly) NSArray<BRPaymentMethod *> *paymentMethods;
var paymentMethods: [BRPaymentMethod]! { get }

Array of BRPaymentMethod objects found on the receipt.


last4CC (read-only)

@property (nonatomic, strong, readonly) BRStringValue *last4CC;
var last4CC: BRStringValue! { get }

The last 4 digits of the credit card used, if any.


authCode (read-only)

@property (nonatomic, strong, readonly) BRStringValue *authCode;
var authCode: BRStringValue! { get }

The payment authorization code, if any.


aid (read-only)

@property (nonatomic, strong, readonly) BRStringValue *aid;
var aid: BRStringValue! { get }

The payment application identifier, if any.


paymentTerminalId (read-only)

@property (nonatomic, strong, readonly) BRStringValue *paymentTerminalId;
var paymentTerminalId: BRStringValue! { get }

Unique identifier for the payment processor's terminal.


paymentTransactionId (read-only)

@property (nonatomic, strong, readonly) BRStringValue *paymentTransactionId;
var paymentTransactionId: BRStringValue! { get }

Unique identifier for the payment processor's transaction.


Loyalty & Member

loyaltyProgram (read-only)

@property (nonatomic, readonly) BOOL loyaltyProgram;
var loyaltyProgram: Bool { get }

Whether a loyalty program indication was found on the receipt.


memberNumber (read-only)

@property (nonatomic, strong, readonly) NSString *memberNumber;
var memberNumber: String! { get }

Loyalty member number detected on the receipt, if any.


isInstacartShopper (read-only)

@property (nonatomic, readonly) BOOL isInstacartShopper;
var isInstacartShopper: Bool { get }

Whether the purchase was made by an Instacart shopper.


Promotions & Surveys

qualifiedPromotions (read-only)

@property (nonatomic, strong, readonly) NSArray<BRPromotion *> *qualifiedPromotions;
var qualifiedPromotions: [BRPromotion]! { get }

If promotion validation is enabled, this will contain all the promotions that were validated.


unqualifiedPromotions (read-only)

@property (nonatomic, strong, readonly) NSArray<BRPromotion *> *unqualifiedPromotions;
var unqualifiedPromotions: [BRPromotion]! { get }

If promotion validation is enabled, this will contain all the promotions that were NOT validated.


qualifiedSurveys (read-only)

@property (nonatomic, strong, readonly) NSArray<BRSurvey *> *qualifiedSurveys;
var qualifiedSurveys: [BRSurvey]! { get }

If promotion validation is enabled, this will contain all the surveys that were validated.


Quality & Validation

ocrConfidence (read-only)

@property (nonatomic, readonly) float ocrConfidence;
var ocrConfidence: Float { get }

Average OCR confidence across all scanned frames, on a scale of 0–100.


tripConfidence (read-only)

@property (nonatomic, readonly) float tripConfidence;
var tripConfidence: Float { get }

Trip confidence (0–100) computed by the parser at the end of the scan session. Reflects how confidently the scan represents a complete purchase trip — date present, merchant identified, total found. Returns 0 when not computed.

SDK Version: 1.71.0


itemConfidence (read-only)

@property (nonatomic, readonly) float itemConfidence;
var itemConfidence: Float { get }

Item confidence (0–100) computed by the parser at the end of the scan session. Reflects how accurately the individual line items were captured. Returns 0 when not computed.

SDK Version: 1.71.0


serverLookupsCompleted (read-only)

@property (nonatomic, readonly) BOOL serverLookupsCompleted;
var serverLookupsCompleted: Bool { get }

Indicates whether any server lookups were still pending at the time results were returned to the client.


foundTopEdge (read-only)

@property (nonatomic, readonly) BOOL foundTopEdge;
var foundTopEdge: Bool { get }

Indicates whether a top edge was found on any frame that was scanned in this session.


foundBottomEdge (read-only)

@property (nonatomic, readonly) BOOL foundBottomEdge;
var foundBottomEdge: Bool { get }

Indicates whether a bottom edge was found on any frame that was scanned in this session.


subtotalMatches (read-only)

@property (nonatomic, readonly) BOOL subtotalMatches;
var subtotalMatches: Bool { get }

Indicates whether the subtotal matches the sum of the products and coupons.


productsPendingLookup (read-only)

@property (nonatomic, readonly) NSInteger productsPendingLookup;
var productsPendingLookup: Int { get }

Number of products still awaiting intelligence results when the scan session ended. A non-zero value indicates not all products were fully enriched.


isDuplicate (read-only)

@property (nonatomic, readonly) BOOL isDuplicate;
var isDuplicate: Bool { get }

Whether the receipt is a duplicate (depends on BRScanOptions.detectDuplicates being enabled).


isFraudulent (read-only)

@property (nonatomic, readonly) BOOL isFraudulent;
var isFraudulent: Bool { get }

Whether the receipt is believed to be fraudulent (depends on BRScanOptions.detectDuplicates being enabled).


duplicateBlinkReceiptIds (read-only)

@property (nonatomic, strong, readonly) NSArray<NSString *> *duplicateBlinkReceiptIds;
var duplicateBlinkReceiptIds: [String]! { get }

If isDuplicate is true, this property contains the BlinkReceipt ID(s) of the duplicate receipts.


E-Receipt

ereceiptOrderNumber (read-only)

@property (nonatomic, strong, readonly) NSString *ereceiptOrderNumber;
var ereceiptOrderNumber: String! { get }

For an Amazon or e-receipt order, this is the order number.


ereceiptOrderStatus (read-only)

@property (nonatomic, strong, readonly) NSString *ereceiptOrderStatus;
var ereceiptOrderStatus: String! { get }

For an e-receipt order, this is the order status.


ereceiptPurchaseType (read-only)

@property (nonatomic, strong, readonly) NSString *ereceiptPurchaseType;
var ereceiptPurchaseType: String! { get }

For an Amazon or e-receipt order, this is the type of purchase.


ereceiptRawHTML (read-only)

@property (nonatomic, strong, readonly) NSString *ereceiptRawHTML;
var ereceiptRawHTML: String! { get }

For an Amazon or e-receipt order, this is the raw HTML that was parsed.


ereceiptEmailProvider (read-only)

@property (nonatomic, strong, readonly) NSString *ereceiptEmailProvider;
var ereceiptEmailProvider: String! { get }

Name of the email provider from which the e-receipt was obtained.


ereceiptMerchantEmail (read-only)

@property (nonatomic, strong, readonly) NSString *ereceiptMerchantEmail;
var ereceiptMerchantEmail: String! { get }

The sender address of the e-receipt email.


ereceiptEmailSubject (read-only)

@property (nonatomic, strong, readonly) NSString *ereceiptEmailSubject;
var ereceiptEmailSubject: String! { get }

Subject line of the e-receipt email.


ereceiptEmailId (read-only)

@property (nonatomic, strong, readonly) NSString *ereceiptEmailId;
var ereceiptEmailId: String! { get }

Internal message ID of the e-receipt email from the email provider.


ereceiptComponentEmails (read-only)

@property (nonatomic, strong, readonly) NSArray<BRScanResults *> *ereceiptComponentEmails;
var ereceiptComponentEmails: [BRScanResults]! { get }

For e-receipt orders, if aggregation is turned on, this contains the BRScanResults objects from each component email for a given order. Note: for emails from a different scrape session, only blinkReceiptId will be populated.


ereceiptFulfilledBy (read-only)

@property (nonatomic, strong, readonly) NSString *ereceiptFulfilledBy;
var ereceiptFulfilledBy: String! { get }

Third-party fulfillment service (e.g., "Instacart"), if any.


ereceiptSubMerchant (read-only)

@property (nonatomic, strong, readonly) NSString *ereceiptSubMerchant;
var ereceiptSubMerchant: String! { get }

Sub-merchant name (e.g., "McDonald's" for an Uber Eats order), if any.


ereceiptPOSSystem (read-only)

@property (nonatomic, strong, readonly) NSString *ereceiptPOSSystem;
var ereceiptPOSSystem: String! { get }

Point of sale system used for the order, if any.


ereceiptShippingCosts (read-only)

@property (nonatomic, readonly) float ereceiptShippingCosts;
var ereceiptShippingCosts: Float { get }

Shipping costs for this e-receipt, if any.


ereceiptAuthenticated (read-only)

@property (nonatomic, readonly) BOOL ereceiptAuthenticated;
var ereceiptAuthenticated: Bool { get }

Whether the e-receipt email was authenticated via DKIM or SPF headers.


ereceiptIsValid (read-only)

@property (nonatomic, readonly) BOOL ereceiptIsValid;
var ereceiptIsValid: Bool { get }

Whether the email was successfully identified as an e-receipt or related message (as opposed to a marketing message, etc.).


ereceiptAdditionalFees (read-only)

@property (nonatomic, strong, readonly) NSDictionary<NSString *, NSString *> *ereceiptAdditionalFees;
var ereceiptAdditionalFees: [String : String]! { get }

Additional fees/charges for this e-receipt, if any (like tips, bag/bottle fees, etc.). Each key-value pair represents the fee name and its amount — e.g. { "Tips": "2.19", "Bag Fee": "0.05" }.


Raw Data

extendedFields (read-only)

@property (nonatomic, strong, readonly) NSDictionary *extendedFields;
var extendedFields: [AnyHashable : Any]! { get }

Additional receipt fields not captured by standard properties.


combinedRawText (read-only)

@property (nonatomic, strong, readonly) NSString *combinedRawText;
var combinedRawText: String! { get }

Cumulative raw OCR text from all scanned frames.


rawBasketText (read-only)

@property (nonatomic, strong, readonly) NSString *rawBasketText;
var rawBasketText: String! { get }

Raw product data results.


rawTripHeaderText (read-only)

@property (nonatomic, strong, readonly) NSString *rawTripHeaderText;
var rawTripHeaderText: String! { get }

A set of raw trip results found on top of receipt.


rawTripFooterText (read-only)

@property (nonatomic, strong, readonly) NSString *rawTripFooterText;
var rawTripFooterText: String! { get }

A set of raw trip results found on bottom of receipt.


Methods

addUserCorrectedProduct(withBrand:upc:productName:imageUrl:totalPrice:quantity:)

- (void)addUserCorrectedProductWithBrand:(NSString *)brand
upc:(NSString *)upc
productName:(NSString *)productName
imageUrl:(NSString *)imgUrl
totalPrice:(float)totalPrice
quantity:(float)quantity;
func addUserCorrectedProduct(
withBrand brand: String!,
upc: String!,
productName: String!,
imageUrl imgUrl: String!,
totalPrice: Float,
quantity: Float
)

For a custom user corrections flow: if the user adds a new product, call this method to add it to the scan results object.

Parameters:

ParameterDescription
brandThe product brand
upcThe product UPC
productNameThe product name
imgUrlThe product image URL
totalPriceThe total price for this line item
quantityThe quantity

userCorrectedDate:

- (void)userCorrectedDate:(NSString *)dateString;
func userCorrectedDate(_ dateString: String!)

For a custom user corrections flow: when a user modifies the date, call this method to update the receipt's purchase date.

Parameters:

ParameterDescription
dateStringThe corrected date string

userCorrectedTotal:

- (void)userCorrectedTotal:(float)total;
func userCorrectedTotal(_ total: Float)

For a custom user corrections flow: when a user modifies the total, call this method to update the receipt's purchase total.

Parameters:

ParameterDescription
totalThe corrected total amount

userCorrectedMerchant:

- (void)userCorrectedMerchant:(NSString *)name;
func userCorrectedMerchant(_ name: String!)

For a custom user corrections flow: when a user modifies the merchant, call this method to update the receipt's merchant name.

Parameters:

ParameterDescription
nameThe corrected merchant name